forked from I2P_Developers/i2p.i2p
2007-01-20 zzz
* i2psnark: More choking rotation tweaks
* Improve performance by not reading in the whole
piece from disk for each request. A huge memory savings
on 1MB torrents with many peers.
This commit is contained in:
@@ -127,6 +127,20 @@ class PeerCheckerTask extends TimerTask
|
||||
coordinator.uploaders--;
|
||||
removedCount++;
|
||||
|
||||
// Put it at the back of the list
|
||||
it.remove();
|
||||
removed.add(peer);
|
||||
}
|
||||
else if (!peer.isInteresting() && !coordinator.completed())
|
||||
{
|
||||
// If they aren't interesting make someone else a downloader
|
||||
if (Snark.debug >= Snark.DEBUG)
|
||||
Snark.debug("Choke uninteresting peer: " + peer, Snark.DEBUG);
|
||||
peer.setChoking(true);
|
||||
uploaders--;
|
||||
coordinator.uploaders--;
|
||||
removedCount++;
|
||||
|
||||
// Put it at the back of the list
|
||||
it.remove();
|
||||
removed.add(peer);
|
||||
|
||||
Reference in New Issue
Block a user