Re: [gtkmm] Custom TreeStore Problems



Murray Cumming Comneon com schrieb:
From: Christof Petig [mailto:christof petig-baender de] Reason: Porting our apps from gtk1 to gtk2 came to a halt when I realized that out use of TreeStore is many times slower than our custom Tree-like class which I mapped to a CList (with reasonably well performance).


There is quite a bit of discussion about TreeView performance on the
gtk-list and I think you have found some. I would investigate
- freezing/thawing the View while inserting large amounts of data.

temporarily set_model(Glib::RefPtr<Gtk::TreeModel>()) made it 2 seconds faster (out of 20). This is not the real problem.

- Not sorting while adding data.

I never touched sorting ... I don't think I have to explicitely disable it.

- Rumored speed TreeView improvements in GTK+ 2.4.

Difficult to tell (I listen gtk-devel closely) without gtkmm-2.4 available and 2.4 still changing API wise.

I'd really like to roll my own TreeStore for now. But

MyTreeModel()
     : Glib::ObjectBase(typeid(MyTreeModel)), Gtk::TreeModel()
{ ...}

didn't help me. Are there any more gotchas left?

(owntreemodel:10416): glibmm-CRITICAL **: file interface.cc: line 53 (Glib::Interface::Interface(const Glib::Interface_Class&)): assertion `gobject_ != 0' failed

(owntreemodel:10416): GLib-GObject-CRITICAL **: file gobject.c: line 1337 (g_object_unref): assertion `G_IS_OBJECT (object)' failed

Yours
    Christof

PS: I'll happily donate the ~150 line example to gtkmm/examples - once it works ...




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