Re: GtkTreeView - why so SLOW?



Hi,

Olaf Frączyk <olaf cbk poznan pl> writes:

Inserting rows in TreeView takes much time, and eats a lot of processor
time.
The TreeView is inserted into a scrolled Window. When I use the ruler to
go up to the list and down, the CPU usage is about 50-60 percent on
Duron 1GHz.
I use ListStore, and I'm inserting about 5000 rows and I have 8 columns.

The same thing using CList inserts in a fraction of second (including
fetching data from database - in TreeView I was only inserting some data
not getting them from database).
And moving the list up and down is much smoother and eats about 2-3
percent CPU.

is your ListStore sorting? I've discovered a similar problem and found
that inserting lots of rows into a sorted store is very slow. This
doesn't surprise me but what annoyed me is the fact that there doesn't
seem to be any API to switch sorting off (or freeze/thaw it). I have
worked around the problem by calling
gtk_tree_sortable_set_sort_column_id() after inserting all the
rows. This means however that I have to create a new store each time I
want to populate the store.


Salut, Sven



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