Ruby-gnome2 performance

Hi guys,

I have problems with the performance of ruby-gnome2 bindings on my
Windows machine.

For example, when I run the following code, it takes at least 1 second
for the window to appear:

require 'gtk2'
Gtk.init

button = Gtk::Button.new("Hello World")
window = Gtk::Window.new
window.signal_connect("destroy") { Gtk.main_quit }
window.border_width = 10
window.add(button)
window.show_all

Gtk.main

I am currently working on a complicate interface and this slow
performance scares me,
especially because with Python I do not have the same problem.

Could it be that PyGTK is better implemented, or do I have a problem
with my system ?
What do you think ?

I am on Windows XP, using Ruby 1.8.2 and ruby-gnome2 version 2-0.14.1

Thank you,

Alex N. wrote:

I am currently working on a complicate interface and this slow
performance scares me,
especially because with Python I do not have the same problem.

I would suspect that it’s Ruby, many people have complained about how
slow Ruby is. :frowning:

On 6/16/06, Reggie Mr [email protected] wrote:

Alex N. wrote:

I am currently working on a complicate interface and this slow
performance scares me,
especially because with Python I do not have the same problem.

I would suspect that it’s Ruby, many people have complained about how
slow Ruby is. :frowning:

I would not, at least not for the reason you state!
Sorry OP that I cannot help on the subject, just had to defend the red
gem.

Robert

Posted via http://www.ruby-forum.com/.


Deux choses sont infinies : l’univers et la bêtise humaine ; en ce qui
concerne l’univers, je n’en ai pas acquis la certitude absolue.

  • Albert Einstein

Ruby has a very slow startup time. There’s nothing to deny there. I
wouldn’t blame the bindings, but yes, I would blame Ruby.

Still, we all love Ruby anyways, and eagerly wait Ruby 2.

Matthew H. wrote:

Ruby has a very slow startup time. There’s nothing to deny there. I
wouldn’t blame the bindings, but yes, I would blame Ruby.
(flori@lambda:src 0)$ time ruby -e1 ; time perl -e1 ; time python -c1 ;
time java Foo

real 0m0.005s
user 0m0.004s
sys 0m0.000s

real 0m0.005s
user 0m0.004s
sys 0m0.004s

real 0m0.021s
user 0m0.016s
sys 0m0.000s

real 0m0.108s
user 0m0.040s
sys 0m0.004s

Yes, very slow startup time.

BTW: I don’t have any speed problems with ruby-gnome2 unlike the OP.
It’s unlikely, that they are related to Ruby’s execution speed in any
way, because they are written mostly in C.

Still, we all love Ruby anyways, and eagerly wait Ruby 2.

Florian