GNOME Bugzilla – Bug 99134
GtkTreeView calls GtkTreeModel::get_value for invisible elements
Last modified: 2011-02-04 16:11:56 UTC
GtkTreeView calls GtkTreeModel::get_value for invisible elements which can be a big performance hit for large displayed trees (possibly larger than available memory). It does so even when the column widths are fixed (I could understand if the calls were made to calculate the column widths). GtkCellRendererText provides a special function gtk_cell_renderer_text_set_fixed_height_from_font() to allegedly speed up computation of the cell height but it does not appear to help. I attach a test program that demonstrates the problem. Displaying takes 13 times longer than it could in principle.
Created attachment 12440 [details] tree-view-bug-demo.c
Moving remaining bugs to 2.2.1.
While we are at it, could GtkTreeView provide hints which elements will be "soon" needed, possibly provide a list of rows that GtkTreeModel::get_value is going to be evaluated for? This would make it easier to fetch actually needed elements from a database, or a IMAP server, etc.
Such kind of hints are not easily possible with the current architecture. With your own treemodel + the disable-validation hack you can prolly do get-data-on-demand models. *** This bug has been marked as a duplicate of 80868 ***