#2332: Speed optimizations to torrent.get_status
-------------------+--------------------------------------------------------
 Reporter:  bro    |       Owner:                      
     Type:  patch  |      Status:  new                 
 Priority:  minor  |   Milestone:  performance         
Component:  core   |     Version:  develop (git branch)
 Keywords:         |  
-------------------+--------------------------------------------------------
 Optimized torrent.get_status by keeping track of if the torrent status has
 been updated since last call. If not, use the the previous values instead
 of calling the status functions.

 I've tested loading deluged with 1000 torrents and connecting thin client
 and leaving it running for 2 minutes.
 The number of calls to get_status is around 250000
 Current get_status used a total of 15 seconds CPU, while this version used
 6 seconds. According to cProfile the average runtime is reduced from 60 to
 20 microseconds.

 The downside is that the code is a bit more verbose.

 https://github.com/bendikro/deluge/commits/develop-torrent-get-status-
 speedup

-- 
Ticket URL: <http://dev.deluge-torrent.org/ticket/2332>
Deluge <http://deluge-torrent.org/>
Deluge project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/deluge-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to