diff options
author | Alan Fitton <ajf@eth0.org.uk> | 2012-01-08 00:52:56 +0000 |
---|---|---|
committer | Alan Fitton <ajf@eth0.org.uk> | 2012-01-08 00:52:56 +0000 |
commit | e1b13312f975f38d3d7437f28299912eff6947e0 (patch) | |
tree | 563d1d7937ce87915e2055d9b2f1dae37d2b9b71 /src/trg-state-selector.c | |
parent | 0a1fa495bd2186c2004fbc0f8977fe52a5f82168 (diff) |
fix the performance problems with the torrent add dialog on torrents with many files/dirs. the parent size updates just walks up parents rather than a full foreach, and the inserts try to use the previous update to speed up finding/creating the directories. I'll probably do something similar to the main files treeview.
Diffstat (limited to 'src/trg-state-selector.c')
-rw-r--r-- | src/trg-state-selector.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/trg-state-selector.c b/src/trg-state-selector.c index 3eeb1ec..8db7362 100644 --- a/src/trg-state-selector.c +++ b/src/trg-state-selector.c @@ -354,8 +354,8 @@ void trg_state_selector_update(TrgStateSelector * s, guint whatsChanged) g_free(announceHost); } else { trg_state_selector_insert(s, priv->n_categories, - g_hash_table_size(priv-> - trackers), + g_hash_table_size + (priv->trackers), announceHost, &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, STATE_SELECTOR_ICON, @@ -389,9 +389,9 @@ void trg_state_selector_update(TrgStateSelector * s, guint whatsChanged) } else { trg_state_selector_insert(s, priv->n_categories + - g_hash_table_size(priv-> - trackers), -1, - dir, &iter); + g_hash_table_size + (priv->trackers), -1, dir, + &iter); gtk_list_store_set(GTK_LIST_STORE(model), &iter, STATE_SELECTOR_ICON, GTK_STOCK_DIRECTORY, |