On Thu, Mar 22, 2007 at 04:55:30PM +0100, Nicolas Setton wrote:
> Consider the subprogram attached. It shows a simple tree_view  
> displaying a list_store (5000 columns and 50 rows containing  
> integers). The display performance is very poor: when displaying the  
> last columns, the vertical scollbar takes between 5 and 10 seconds to  
> respond.
> 
> Preliminary note: a tree of 50 columns and 5000 rows displays better  
> performance (scrollbars take between 0 and 1 seconds to respond).

There is a really simple answer to this: GtkTreeView is not a table, it
was not designed to handle views like this with >> 50 columns.

> First suggestion: we'd be better off in this subprogram if the data  
> was implemented as an array instead of as a linked list.

That would only help GtkListStore, other models might need different
solutions.  There are also multiple places in GtkTreeView which all
assume a reasonable amount of columns (I would say < 50), I am not sure
if all this is worth changing at all.

> I'm not familiar with this area yet, so I'm puzzled: is the call to  
> gtk_tree_view_column_cell_set_cell_data really needed for the  
> purposes of gtk_tree_view_bin_expose, or is it just needed for the  
> call to gtk_tree_view_has_special_cell?

It is needed to make the call to gtk_tree_view_has_special_cell() return
a proper and correct result.  This correct result is required in order
to make the key navigation behave properly.

> In any case, I suggest we cache this - probably there is no need to  
> do it in every expose call, only after the model data has changed.

This is something which cannot really be cached, CellDataFuncs can also
influence this value, and CellDataFuncs can depend on more data than
just the data found in the model.


regards,

-kris.
_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-devel-list

Reply via email to