Performance problems with GtkListStore



Hi, I'm having a really weird performance problem with GtkListStore.

You can find the details of the problem in the GTKpod mailing list,
since I'm experiencing this problem only when I use GTKpod (I use other
GTK+ programs that uses GtkTreeViews with thousands of rows and I, like
gmpc, and I have no performance problems with those).

Original report:
http://thread.gmane.org/gmane.comp.ipod.gtkpod.user/2023/focus=2026
Real discussion:
http://thread.gmane.org/gmane.comp.ipod.gtkpod.user/2028

Here is a summary (bare in mind that I might be skipping a lot of
details, so please refer to the original thread).

Loading ~3200 rows in a GtkListStore takes about ~52 seconds in
a quad-core 2GHz. That has been "proved" (I don't know if there is any
GTK+ magic calling gtkpod user code but a simple profiling doesn't show
that) by just commenting this line of code (in a loop):
	gtk_list_store_append (get_model_as_store (model), &iter);
Removing the rows takes about ~30 seconds (but I didn't check that yet
by commenting the line).

Following the suggestions in the "Performance Considerations" of the
GtkListStore documentation[1], I changed the calls:
	gtk_list_store_append (list_store, iter);
	gtk_list_store_set (list_store, iter, ...);
And replace them with:
	gtk_list_store_insert_with_values (list_store, iter, position, ...);
But there was no difference performance-wise.

This happens in my desktop box (Intel Quad-Core 2GHz, Debian unstable),
but doesn't happens in my notebook (Intel Pentium M 1.7GHz, Ubuntu
10.4), which loads the ~3200 rows in a fraction of a seconds.

Any ideas or suggestions on what could be going on is much appreciated.

Thanks.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
More people die from a champagne-cork popping,
than from poison spiders


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]