[#3986] Re: Principle of least effort -- another Ruby virtue. — Andrew Hunt <andy@...>

> Principle of Least Effort.

14 messages 2000/07/14

[#4043] What are you using Ruby for? — Dave Thomas <Dave@...>

16 messages 2000/07/16

[#4139] Facilitating Ruby self-propagation with the rig-it autopolymorph application. — Conrad Schneiker <schneik@...>

Hi,

11 messages 2000/07/20

[ruby-talk:04210] RE: Ruby/Gtk and speed...

From: Aleksi Niemel<aleksi.niemela@...>
Date: 2000-07-25 14:30:40 UTC
List: ruby-talk #4210
> 	My last message was about slowness of Gtk with Ruby. I 
> have probed developers version of Ruby (1.5.x) with last versi of 
> Gtk wrapper (0.23). The problem have not dissapeared.
> 	Any idea?.

It has something to do with gtk's own idle loop. I'm no expert here, started
using gtk last weekend :).

Try changing the code in the end of the rbgtk.c:

  #if 1
      gtk_idle_add((GtkFunction)idle, 0);
  #else
      /* use timeout to avoid busy wait */
      gtk_timeout_add(100, (GtkFunction)idle, 0);
  #endif

I guess I changed the #if to 0 and the gtk_timeout_add to 1000 instead of
100, and it came much faster.

Did you apply the path told by Yasushi Shoji:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/~poffice/mail/ruby-talk/4020

	- Aleksi

In This Thread

Prev Next