Re: GtkTreeView very slow for large lists
- From: John Lindgren <john lindgren aol com>
- To: jcupitt gmail com
- Cc: gtk-app-devel-list gnome org
- Subject: Re: GtkTreeView very slow for large lists
- Date: Fri, 16 Dec 2011 08:36:32 -0500
On 12/16/2011 05:54 AM, jcupitt gmail com wrote:
...
I did notice that you forgot to put the treeview into fixed-height mode.
Normally, treeview lets rows vary in height (so you can change font
between rows, for example). To make this work, treeview has a idle
task which scans the entire model after it's been realized and
calculates a total height for the view, updating an initial guess.
This is the thing that's causing your terrible performance problems.
On my elderly desktop I see your test window almost immediately, but
it takes 50s for the CPU to drop to zero as it requests the height of
every row. If i add this line after creating the columns:
gtk_tree_view_set_fixed_height_mode (GTK_TREE_VIEW (list), TRUE);
The window appears instantly and there is no background CPU churn.
John
Aha! Thank you, that is what I was missing. Problem solved.
-- John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]