It returns which torrents were updated and which torrents that should be shown or hidden in the view. The biggest change is that it now takes the status dictionary as input and updates the status with the torrents as needed.This reduces the workload for the daemon tremendously and makes it much faster on the client side to get the filtered results. Self.updated_ids contains the torrent ids that have been updated from core and not yet updated in the ui.Īll of the filtering previously performed in filtermanager is now performed by self.torrentfilter. This was extremely expensive, and is no longer needed as the torrents that have been updated on the server side are now updated automatically. It no longer keeps track of cache times for each value.
The dirty functionality was not used anymore (since the last major torrentview changes) so it was completely removed.No longer needed as this is handled by sessionproxy.The torrent_ids to hide (change filter column value to False).The torrent_ids to show (change filter column value to True).The torrent_ids that have been updated with new data.Updates self.visible_torrents no contain the currently visible rows.Which torrents that are currently displayed is stored in the set self.visible_torrents which is updated in _on_get_torrents_status. The main difference is that self.status now always contains all the torrents, not only the torrents that are displayed.
Deluge torrent python update#
Deluge torrent python code#
The code changes for the webui should work but the code should be reviewedįeedback is very appreciated.The filtering is much more efficient than the current code.This should make it possible to implement advanced filtering quite easily.The filtering functionality is implemented with PyDbLite.Much faster to change the list on the client side as it no longer has to ask the server.The rest of the filtering is performed on the client side. This has been changed so that the server only filters on the owner to make sure only the torrents the user is allowed to fetch are returned. With thousands of torrents, the workload of filtering the torrents each time the list is sent becomes a performance bottleneck. The filtering of the torrents has been split between the server and client.With thousands of torrents, the overhead of processing the entire torrent list to be sent and received regularly causes the major part of the CPU usage as seen by profiling. This reduces the amount of network data that needs to be transfered between the client and server greatly.Client can request to get only the torrents that were updated since last time.This branch contains the following modifications: Created 03 Aug, 2014 Pull Request #6 User Bendikro