Custom TreeModel (was RE: signals versus vfuncs)
- From: Murray Cumming Comneon com
- To: christof petig-baender de
- Cc: gtkmm-list gnome org, gtk-devel-list gnome org
- Subject: Custom TreeModel (was RE: signals versus vfuncs)
- Date: Fri, 9 Jan 2004 14:54:25 +0100
Christof wrote:
> Do you still feel that a custom tree model is unnecessary? My feeling is
> that for _massive_ amounts of lines the C++ wrapper imposes too much
> overhead (vfunc indirection, iterator conversion etc. sum up once the []
> operator on a Gtk::Tree::Row is used many times to access the columns).
>
> My std::map based model easily handles sorted insertion/reorganization
> of 100k rows into a tree without significant slowdown.
I would like to see some proof that it's faster in GTK+ when using normal
TreeStores or ListStores. Such proof should be in bugzilla as a gtkmm
performance bug.
> PS: It seems that because of the
> Gtk::TreeModel::add_interface(get_type()); call during type creation I
> cannot use the Glib provided custom type infrastructure.
I'm not sure what you want to do instead, or can't do. What "Glib provided
custom type infrastructure" do you mean? API docs URLS are nicest.
> [Try to leave
> it out ...] Perhaps it's worth fixing the need for it (IMHO deriving
> from Gtk::TreeModel should do the trick as well). But to judge or fix
> that I understand too few of the gtkmm type internals (still learning)
> and their proposed API.
The problem, I think, is that the Gtype must come from the derived type, but
you want that type to be registered in the base C++ class, whose constructor
runs before the derived part of the class exists. I don't think the
add_interface() call is too bad for something that is very rarely done.
Murray Cumming
www.murrayc.com
murrayc usa net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]