Ignore:
Timestamp:
01/21/11 17:07:23 (5 years ago)
Author:
jordan
Message:

(trunk gtk) companion commit to r11738 to reduce unnecessary re-rendering in the main window

The main window called gtk_tree_model_filter_refilter() once per second to refresh the torrent list's filtering. This is not an efficient approach: gtk_tree_model_filter_refilter() emits a "row changed" event for every row, causing unnecessary re-rendering.

I've removed the call to gtk_tree_model_filter_refilter() and expanded the model to includes all the fields necessary for filtering. That way we only fire "row changed" events for rows that actually change.

By reducing the number of renders in steady state, this might ameliorate https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/655024

However it will *not* help the related "CPU spikes to 100% on scrolling" ticket at https://trac.transmissionbt.com/ticket/3887 because rendering paused torrents is still exceptionally expensive in the murrine theme.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/tr-window.c

    r11738 r11740  
    852852        updateTorrentCount( p );
    853853        updateStats( p );
    854         gtk_tree_model_filter_refilter( GTK_TREE_MODEL_FILTER( p->filter_model ) );
    855854    }
    856855}
Note: See TracChangeset for help on using the changeset viewer.