Re: need advice: "gtk_tree_view slow"



On Thu, 2003-08-28 at 21:03, Bert Marco Schuldes wrote:
Hallo.

I started two days ago to write my first application using GTK,
but I am pretty experienced with C.

I have read about the problems with gtk_tree_view being
too slow:

Even worse. It takes about 6 seconds for 1000 rows.
Under M$ Windows it takes longer (23 sec).

My application (windows) uses a single-column tree which can grow 
easily to more than 1000 entries. Something like "23 secs" would be 
totally unacceptable. 

- Is this a general problem when using gtk_tree_view, or was the
  case mentioned some "special" case?

- should I better use gtkctree, to avoid this problem, even though
  deprecated?

A) Make sure you have Pango-1.2.5. It has significant performance
   improvements on Windows.

B) It shouldn't take 23 seconds or 6 seconds to add a thousand
   rows on any sort of moderately fast machine.

   The most common performance traps with GtkTreeView are:

   - Adding rows to a sorted model 1-by-1. Add all your rows,
     then turn on sorting.

   - Auto-resize columns can make things much slower;
     GTK_TREE_VIEW_COLUMN_AUTOSIZE should generally be avoided
     for models of more than a few hundred rows.

     (Though if you can add all your data to the model before
     putting it into the GtkTreeView, it's probably OK. The problem
     is that every time a single row is changed, GTK+ needs to check
     the size of all rows.)

Regards,
                                                Owen





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