-
Notifications
You must be signed in to change notification settings - Fork 285
Description
I run instances of transmission-daemon that seed quite a few torrents, test instances had 17k and 56k.
The smaller 17k instance needs about 1 second of CPU time to load a list of torrents on 5.5.1. On 5.6 it needs 47 seconds of CPU time. Bigger 56k instance requires 5 seconds of CPU time with 5.5.1, and more than 10 minutes on 5.6.
I'm running it on windows 7 with transmission-daemon 2.93.
The issue is present in 5.6, 5.10, 5.13, 5.15.3, 5.15.4.
Versions 5.5.1, 5.4, 5.0.1 all work.
When built from source, 5.5.1 works as expected, 5.15.4 is extremely slow.
The culprit seems to be in main.pas:7157, repeated calls to FTorrents.IndexOf(idxTorrentId, ids[i]).
Optimizing it - calling FTorrents.IndexOf(idxTorrentId, ids[i]) once and using saved id later reduces loading time to ~1:50, but it's still too slow to be considered even remotely acceptable.