1

Closed

Rubygems are very slow after including Windows forms

description

If you try to require a gem before putting include System::Windows::Forms in your script, it loads the gem in a second or two. If you do the include first, it can take up to a minute.
 
Here's an example script to demonstrate the problem:
 
require "System.Windows.Forms"
require "rubygems"
 
start = Time.now
 
# If you reorder these next two lines,
# the script takes ten times longer to run.
require "active_support"
include System::Windows::Forms
 
puts Time.now - start
 
Doesn't seem to matter which gem it is, either.

file attachments

Closed Jul 28, 2011 at 12:22 AM by jimmysch
No repro

comments

TomasMatousek wrote Mar 9, 2010 at 12:39 AM

I don't observe any significant difference:

D:\temp>rbr a.rb
0.312324

D:\temp>rbr b.rb
0.296707

TomasMatousek wrote Mar 9, 2010 at 12:39 AM

b