mirror of
https://github.com/transmission/transmission
synced 2024-12-29 11:06:23 +00:00
perf: check torrrent seed ratio less frequently (#3747)
This commit is contained in:
parent
b01eebdaf4
commit
6d721fe32f
1 changed files with 9 additions and 8 deletions
|
@ -2273,11 +2273,14 @@ void tr_peerMgr::rechokePulse() const
|
||||||
|
|
||||||
for (auto* const tor : session->torrents())
|
for (auto* const tor : session->torrents())
|
||||||
{
|
{
|
||||||
if (!tor->isRunning)
|
if (tor->isRunning)
|
||||||
{
|
{
|
||||||
continue;
|
// possibly stop torrents that have seeded enough
|
||||||
|
tr_torrentCheckSeedLimit(tor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tor->isRunning)
|
||||||
|
{
|
||||||
if (auto* const swarm = tor->swarm; swarm->stats.peer_count > 0)
|
if (auto* const swarm = tor->swarm; swarm->stats.peer_count > 0)
|
||||||
{
|
{
|
||||||
rechokeUploads(swarm, now);
|
rechokeUploads(swarm, now);
|
||||||
|
@ -2285,6 +2288,7 @@ void tr_peerMgr::rechokePulse() const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
****
|
****
|
||||||
|
@ -2564,9 +2568,6 @@ void tr_peerMgr::bandwidthPulse()
|
||||||
/* torrent upkeep */
|
/* torrent upkeep */
|
||||||
for (auto* const tor : session->torrents())
|
for (auto* const tor : session->torrents())
|
||||||
{
|
{
|
||||||
/* possibly stop torrents that have seeded enough */
|
|
||||||
tr_torrentCheckSeedLimit(tor);
|
|
||||||
|
|
||||||
/* run the completeness check for any torrents that need it */
|
/* run the completeness check for any torrents that need it */
|
||||||
if (tor->swarm->needs_completeness_check)
|
if (tor->swarm->needs_completeness_check)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue