GNOME Bugzilla – Bug 94710
Excessive number of get_value calls
Last modified: 2011-02-04 16:11:56 UTC
For source code relating to this, see gnumeric/src/dialogs/dialog-search.c I have equipped a GtkTreeView with a custom model in which values are calculated on the fly. It works but there are some problems... 1. There's no way to tell the view that the whole darn thing has changed underneath it. Well, there is: delete all rows one by one and then insert the new ones. 2. Relatedly, there is no way to tell the view not to size all rows. Right now the model is initially call for all (col,row) combinations. It should be possible to specify "equal height" somehow. (==Assume that it is too expensive to evaluate all cells.) 3. When mousing over the view, the model is called a lot. (Activate the g_print on line 441 to see this.) This feels like an outright bug. Actually I even see this when mousing over other parts of the dialog in which the view sits.
Re #3: the cause appears to be expose events. I wonder why, because the mouse is only moved within the treeview. Here's a sample trace. (gdb) where
+ Trace 29902
Hmm, the treeview always redraws on expose events. There is not much I can do about that. Are you able to see if this is a synthetic expose event? There are not enough frames in order to see that.
The tree_view also draws when the mouse enters/exits a cell to allow individual cells to handle prelighting.
Re-opening. (jrb: even if I agreed that nothing should be done on #3, that still leaves #1 and #2.) Something really needs to be done. This prohibitively expensive in the common case where no pre-lighting is going on. Currently just moving the mouse causes redraws -- think of what this does to remote performance. Mouse movement should be mostly a non- event by default.
Putting on 2.2.0 for now, just like our other optimization bugs.
Moving remaining bugs to 2.2.1.
*** This bug has been marked as a duplicate of 80868 ***