Slow ruby start up on XP

On my Windows XP machine, if I run some command intensive operation
using the command prompt, (like a compile - or a ruby program – see
below), then if I try to start another ruby program from another command
prompt, it will take forever to start (or a long long time). On my
system a 400Mhz system, It takes a 30 seconds for the first print (of
the second program) to come out and > 5 minutes to get past the require
of fox. Normally it takes about 4 seconds for the app to come up.

I am planning to use Ruby as a GUI application for a hardware device we
are going to sell and I am worried that the application might not start
up if someone is doing intensive work (or as in the case below not
really that intensive). Any one have any ideas on what I could do about
this problem? Also can any one try it on their Window’s machine to see
how it runs or if you get similar results?

Anxious in Minnesota (Steve Tuckner)

P.S. For comparision I also ran a perl program that I wrote that uses TK
and it is hardly affected by the first running ruby program and I ran
Chandler the new super PIM written in python. It did seem to be
affected, but it still came up in 30 seconds instead of about 5 to 10.

--------- The first program is a simple counting program

···

while true
starttime = Time.now
for i in 1…100000
j = i * 3
end
endtime = Time.now
print "time = #{endtime - starttime}\n"
end

---------- The second program is a fox program

puts "before require fox"
require "fox"
puts “after require fox”

include Fox

class FxTestWindow < FXMainWindow
def initialize(app)

Invoke base class initialize first

super(app, “FxTest”, nil, nil, DECOR_ALL, 0, 0, 600, 600)
end

Start

def create
super
show(PLACEMENT_SCREEN)
end
end

def runGUI
puts “before FXApp.new”

Make an application

$application = FXApp.new(“Dialog”, “FxWorld”)
puts “after FXApp.new”

Open the display

$application.init(ARGV)

Construct the application’s main window

FxTestWindow.new($application)

Create the application

$application.create

Run the application

$application.run
end

puts "before runGUI"
runGUI

Steve Tuckner