gnome2 and Gtk::TreeModel

A

Aredridel

--=-0lNtKKfzzRMYDnRBezxB
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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

--=-0lNtKKfzzRMYDnRBezxB
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQA/W9jYtP09exA3hooRAuHqAKDRFigdO4uwpKei6WtZ0ltf01i5fgCgxjKy
mqUwJdMNj7GY9rRWmGcZ/DY=
=xMxD
-----END PGP SIGNATURE-----
0
--=-0lNtKKfzzRMYDnRBezxB--
 
M

Masao Mutoh

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

David Espada

El lunes 08 de septiembre, Masao Mutoh escribió:
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?

I don't find any docu in Ruby-gnome2 or in Gtk webs... :(
 
A

Aredridel

--=-8lTw3+qd5b3oLCoRAdOI
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi,
=20
On Mon, 8 Sep 2003 10:18:53 +0900

=20
* Samples: gtk/sample/gtk-demo/, gtk/sample/testgtk/, gtk/sample/misc/tre=
eview.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_notif= y yet,
try them. It may improve the speed.=20

I will do that.
=20
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,=20
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.


--=-8lTw3+qd5b3oLCoRAdOI
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQA/XScMtP09exA3hooRAnq+AJ40T/tPlDGV0hGJK+FHaYIh3CKe2ACcCYZi
VChlXgsAesD36DBoNUZAqDI=
=FvGG
-----END PGP SIGNATURE-----
0
--=-8lTw3+qd5b3oLCoRAdOI--
 
A

Aredridel

--=-PD+Yj+tvuTmjgkWrShZG
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi,
=20
On Mon, 8 Sep 2003 10:18:53 +0900

=20
* Samples: gtk/sample/gtk-demo/, gtk/sample/testgtk/, gtk/sample/misc/tre= eview.rb
* rbbr: http://ruby-gnome2.sourceforge.jp/hiki.cgi?rbbr
* XML Tree Viewer: http://ruby-gnome2.sourceforge.jp/hiki.cgi?XML+Tree+Vi=
ewer

All of them use TreeStore, not the TreeModel module...=20

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

Ari

--=-PD+Yj+tvuTmjgkWrShZG
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQA/XWSAtP09exA3hooRAt60AKCHmqpQC4am0SL65XMyPm218QOEvQCgl7xJ
WWE96suMYuKJBO7W5FHAvuU=
=Hle9
-----END PGP SIGNATURE-----
0
--=-PD+Yj+tvuTmjgkWrShZG--
 
A

Aredridel

--=-rR/RDuCIinLrwi/91fzo
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Viewer

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

--=-rR/RDuCIinLrwi/91fzo
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQA/XWU0tP09exA3hooRAmm7AKDIeUATdQUNund1tc/YXBQ8EkAMwQCgxjgA
+ze+t0Zx+A5JBpEkgJF4RTQ=
=r948
-----END PGP SIGNATURE-----
0
--=-rR/RDuCIinLrwi/91fzo--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top