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?  

* Samples: gtk/sample/gtk-demo/, gtk/sample/testgtk/, gtk/sample/misc/treeview.rb
* rbbr: http://ruby-gnome2.sourceforge.jp/hiki.cgi?rbbr
* XML Tree Viewer: http://ruby-gnome2.sourceforge.jp/hiki.cgi?XML+Tree+Viewer

> 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.

-- 
.:% Masao Mutoh<mutoh / highway.ne.jp>