Re: Gtk::TreeView performance



Igor Gorbounov wrote:
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

It might be faster if it's not having to recalculate sizes all the time. You can set everything to some form of fixed-size mode using:

- CellRenderer::set_fixed_size(width, height)
- TreeViewColumn::set_sizing(TREE_VIEW_COLUMN_FIXED)
- setting the tree-view property "fixed-height-mode" to true

This is based on the gtkmm API docs, I haven't actually tried it, or even used gtkmm before. I think that some of this may not be present in older versions of GTK.

--
Tim Evans
Applied Research Associates NZ
http://www.aranz.com/



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