Re: Gtk::TreeView performance



I've been running into similar performance issues with the TreeView, using a liststore containing thousands of  rows.

For example, with about 40K rows with 10 columns the data loads into the store quickly and then the cpu races for around 30-40 seconds.   I think what is going on is the treeview is doing calculations to decide how much space and padding each column needs.   I had hoped that having fixed widths would mean no calculations needed to be done, but I still get the same cpu racing.  If I watch the treeview carefully while this goes on I see a small shift in the layout of data within each column, moving from left to right (presumably as the code loops through the columns).

My suspicion is that the treeview is calculating the layout of the renderers within the the fixed width of each column.   I'm guessing if there was an option to stop it doing this (since its initial layout is more than good enough for me) that we would see a dramatic speed improvement.

When I get time I was intending to take a look at this, but if there is someone out there more familiar with the treeview code -- that means anyone who has actually looked at it :)  then a few pointers would be most welcome.

John

Igor Gorbounov wrote:
Gtk::TreeView performance

Hi, All!
My application uses a TreeView (using ListStore model) table to present
measured data
once per second. This table has about 20 rows and about 40 columns.
The problem is in consuming too much CPU resources (about 14% when the
table is
switched on, and near 3% when it is switched off). The cells af this
tables display
text, and the color of this text foreground and background is changed
depending on
values in invisible cells.
So is there any way to optimize this whole structure?
    Igor Gorbounov
_______________________________________________
gtk-list mailing list
gtk-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-list



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