2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Avoid slow seeding
	* src/PeerInteractionCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-11-13 15:39:22 +00:00
parent 586b63fdbd
commit c0197f1040
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Avoid slow seeding
* src/PeerInteractionCommand.cc
2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2008-11-14 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Updated usage for -i option. Updated usage for -i option.

View File

@ -249,7 +249,8 @@ bool PeerInteractionCommand::executeInternal() {
} }
case WIRED: case WIRED:
// See the comment for writable check below. // See the comment for writable check below.
// disableWriteCheckSocket(); disableWriteCheckSocket();
btInteractive->doInteractionProcessing(); btInteractive->doInteractionProcessing();
if(btInteractive->countReceivedMessageInIteration() > 0) { if(btInteractive->countReceivedMessageInIteration() > 0) {
updateKeepAlive(); updateKeepAlive();
@ -258,11 +259,10 @@ bool PeerInteractionCommand::executeInternal() {
(peer->getLatency() < 1500)) || (peer->getLatency() < 1500)) ||
(peer->peerInterested() && !peer->amChoking())) { (peer->peerInterested() && !peer->amChoking())) {
// Writable check causes CPU usage high because socket becomes writable // Writable check to avoid slow seeding
// instantly. So don't do it. if(btInteractive->isSendingMessageInProgress()) {
// if(btInteractive->isSendingMessageInProgress()) { setWriteCheckSocket(socket);
// setWriteCheckSocket(socket); }
// }
if(maxDownloadSpeedLimit > 0) { if(maxDownloadSpeedLimit > 0) {
TransferStat stat = _requestGroup->calculateStat(); TransferStat stat = _requestGroup->calculateStat();