mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Improve performance of initial torrent list load
This commit is contained in:
parent
61b9e4ae0e
commit
a118d3e7d5
2 changed files with 6 additions and 4 deletions
|
@ -3,6 +3,7 @@ Deluge 0.9.07 - "1.0.0_RC7" (In Development)
|
|||
* Fix Vista slowness issue
|
||||
GtkUI:
|
||||
* Add 'edit' to edit trackers dialog
|
||||
* Improve performance of initial torrent list load
|
||||
|
||||
Deluge 0.9.06 - "1.0.0_RC6" (13 August 2008)
|
||||
Core:
|
||||
|
|
|
@ -205,7 +205,7 @@ class TorrentView(listview.ListView, component.Component):
|
|||
|
||||
def _on_session_state(self, state):
|
||||
for torrent_id in state:
|
||||
self.add_row(torrent_id)
|
||||
self.add_row(torrent_id, update=False)
|
||||
|
||||
self.update_filter()
|
||||
self.update()
|
||||
|
@ -360,7 +360,7 @@ class TorrentView(listview.ListView, component.Component):
|
|||
if self.status != {}:
|
||||
self.update_view()
|
||||
|
||||
def add_row(self, torrent_id):
|
||||
def add_row(self, torrent_id, update=True):
|
||||
"""Adds a new torrent row to the treeview"""
|
||||
# Insert a new row to the liststore
|
||||
row = self.liststore.append()
|
||||
|
@ -369,8 +369,9 @@ class TorrentView(listview.ListView, component.Component):
|
|||
row,
|
||||
self.columns["torrent_id"].column_indices[0],
|
||||
torrent_id)
|
||||
self.update()
|
||||
self.update_filter()
|
||||
if update:
|
||||
self.update()
|
||||
self.update_filter()
|
||||
|
||||
def remove_row(self, torrent_id):
|
||||
"""Removes a row with torrent_id"""
|
||||
|
|
Loading…
Add table
Reference in a new issue