From e1b13312f975f38d3d7437f28299912eff6947e0 Mon Sep 17 00:00:00 2001 From: Alan Fitton Date: Sun, 8 Jan 2012 00:52:56 +0000 Subject: 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. --- src/trg-state-selector.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/trg-state-selector.c') 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, -- cgit v1.2.3