Gnome2 and Gtk::TreeModel

Is anyone out there using Gtk::TreeModel in a ruby app, and have some
code they’d be willing to share? I can’t quite make heads or tails of
the docs, and the default implementation of TreeModel (TreeStore) is too
slow when you have as many thousands of nodes in it as I want to put
there.

Ari

Hi,

Is anyone out there using Gtk::TreeModel in a ruby app, and have some
code they’d be willing to share?

I can’t quite make heads or tails of
the docs, and the default implementation of TreeModel (TreeStore) is too
slow when you have as many thousands of nodes in it as I want to put
there.

If you haven’t use GLib::Object#freeze_notify and GLib::Object#thaw_notify yet,
try them. It may improve the speed.

BTW,
Do you build many thousands of nodes at once?
I think it’s not good idea even if you develop it in C.
If the tree becomes so big, it’s better to load the children
(don’t include Grandchildren) when the parent is expanded.

Or, you can use Thread,
though I don’t like to use Thread for this purpose
because it’ll occupy CPU usage.

···

On Mon, 8 Sep 2003 10:18:53 +0900 Aredridel aredridel@nbtsc.org wrote:


.:% Masao Mutohmutoh@highway.ne.jp

And where are they used?

I don’t find any docu in Ruby-gnome2 or in Gtk webs… :frowning:

···

El lunes 08 de septiembre, Masao Mutoh escribió:

I can’t quite make heads or tails of the docs, and the default
implementation of TreeModel (TreeStore) is too slow when you have
as many thousands of nodes in it as I want to put there.

If you haven’t use GLib::Object#freeze_notify and
GLib::Object#thaw_notify yet, try them. It may improve the speed.


David Espada, a.k.a. |)a/inci

Debian GNU/Linux Sid

Hi,

Is anyone out there using Gtk::TreeModel in a ruby app, and have some
code they’d be willing to share?

  • Samples: gtk/sample/gtk-demo/, gtk/sample/testgtk/, gtk/sample/misc/treeview.rb

None use TreeModel – they all use TreeStore, which won’t work well for
me.

If you haven’t use GLib::Object#freeze_notify and GLib::Object#thaw_notify yet,
try them. It may improve the speed.

I will do that.

BTW,
Do you build many thousands of nodes at once?
I think it’s not good idea even if you develop it in C.
If the tree becomes so big, it’s better to load the children
(don’t include Grandchildren) when the parent is expanded.

Actually, it’s a list interface – no child nodes at all. I’m going to
be filtering the list as part of the UI, but there are times the whole
list will be loaded.

Or, you can use Thread,
though I don’t like to use Thread for this purpose
because it’ll occupy CPU usage.

That’s something I’ll see when I get there.

···

On Mon, 2003-09-08 at 06:16, Masao Mutoh wrote:

On Mon, 8 Sep 2003 10:18:53 +0900 > Aredridel aredridel@nbtsc.org wrote:

All of them use TreeStore, not the TreeModel module…

I’m interested in making my own model that uses an SQL backend to
display data very dynamically.

Ari

···

On Mon, 2003-09-08 at 06:16, Masao Mutoh wrote:

Hi,

On Mon, 8 Sep 2003 10:18:53 +0900 > Aredridel aredridel@nbtsc.org wrote:

Is anyone out there using Gtk::TreeModel in a ruby app, and have some
code they’d be willing to share?

Hi,

···

On Mon, 8 Sep 2003 21:58:19 +0900 David Espada davinciSINSPAM@escomposlinux.org wrote:

I can’t quite make heads or tails of the docs, and the default
implementation of TreeModel (TreeStore) is too slow when you have
as many thousands of nodes in it as I want to put there.

If you haven’t use GLib::Object#freeze_notify and
GLib::Object#thaw_notify yet, try them. It may improve the speed.

And where are they used?

Do you invetigate my recommanded samples?

OK, it’s in rbbr.


.:% Masao Mutohmutoh@highway.ne.jp

As a side note, rbbr is one nice tool, and fast and well-written.
Congratulations!

Anyone doing develoment and having gnome2 available would do well to
install ruby-gnome2 and rbbr.

Ari

···

On Mon, 2003-09-08 at 23:27, Aredridel wrote:

On Mon, 2003-09-08 at 06:16, Masao Mutoh wrote:

Hi,

On Mon, 8 Sep 2003 10:18:53 +0900 > > Aredridel aredridel@nbtsc.org wrote:

Is anyone out there using Gtk::TreeModel in a ruby app, and have some
code they’d be willing to share?

If you haven’t use GLib::Object#freeze_notify and
GLib::Object#thaw_notify yet, try them. It may improve the speed.

And where are they used?

Do you invetigate my recommanded samples?

Yes, all but…

OK, it’s in rbbr.

…this :frowning:

Sorry. And thanks.

···

El lunes 08 de septiembre, Masao Mutoh escribió:


David Espada, a.k.a. |)a/inci

Debian GNU/Linux Sid