]> granicus.if.org Git - transmission/commit
(trunk gtk) companion commit to r11738 to reduce unnecessary re-rendering in the...
authorJordan Lee <jordan@transmissionbt.com>
Fri, 21 Jan 2011 17:07:23 +0000 (17:07 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Fri, 21 Jan 2011 17:07:23 +0000 (17:07 +0000)
commitacd941f17a7cdc43cb997d8963982ac27f7c0f20
treee0a16a031b58d138de58ab49c9fed8d074ac7abc
parent58c755653469589ac505c9c68d69b15700623e3b
(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.
gtk/tr-core.c
gtk/tr-core.h
gtk/tr-window.c