mirror of
https://github.com/aria2/aria2.git
synced 2024-12-14 17:39:11 +00:00
2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed writable check when socket's send buffer is full in BitTorrent downloads to lower CPU usage. * src/PeerInteractionCommand.cc
This commit is contained in:
parent
d3f05f44b7
commit
dfe3b9bf15
@ -1,3 +1,9 @@
|
||||
2008-08-01 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Removed writable check when socket's send buffer is full in BitTorrent
|
||||
downloads to lower CPU usage.
|
||||
* src/PeerInteractionCommand.cc
|
||||
|
||||
2008-07-31 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||
|
||||
Fixed broken gzip inflation.
|
||||
|
@ -223,7 +223,8 @@ bool PeerInteractionCommand::executeInternal() {
|
||||
break;
|
||||
}
|
||||
case WIRED:
|
||||
disableWriteCheckSocket();
|
||||
// See the comment for writable check below.
|
||||
// disableWriteCheckSocket();
|
||||
btInteractive->doInteractionProcessing();
|
||||
if(btInteractive->countReceivedMessageInIteration() > 0) {
|
||||
updateKeepAlive();
|
||||
@ -231,9 +232,11 @@ bool PeerInteractionCommand::executeInternal() {
|
||||
if((peer->amInterested() && !peer->peerChoking() && (peer->getLatency() < 1500)) ||
|
||||
(peer->peerInterested() && !peer->amChoking())) {
|
||||
|
||||
if(btInteractive->isSendingMessageInProgress()) {
|
||||
setWriteCheckSocket(socket);
|
||||
}
|
||||
// Writable check causes CPU usage high because socket becomes writable
|
||||
// instantly. So don't do it.
|
||||
// if(btInteractive->isSendingMessageInProgress()) {
|
||||
// setWriteCheckSocket(socket);
|
||||
// }
|
||||
|
||||
if(maxDownloadSpeedLimit > 0) {
|
||||
TransferStat stat = peerStorage->calculateStat();
|
||||
|
Loading…
Reference in New Issue
Block a user