tags:

views:

40

answers:

0

When I embed IronRuby and tell it to require the Ruby gems, it takes a very long time. Does anyone know why? I should mention that when I do this in the IronRuby console (ir.exe), it is nearly instantaneous.

var engine = IronRuby.Ruby.CreateEngine();
var paths = engine.GetSearchPaths().ToList();
paths.Add(irPath + @"\lib\IronRuby");
paths.Add(irPaty + @"\lib\ruby\1.8");
paths.Add(irPath + @"\lib\ruby\site_ruby\1.8");
engine.SetSearchPaths(paths);

engine.Execute("require 'rubygems'");

EDIT: I just realized that this problem only happens when the (Visual Studio) debugger is attached. It is 10-15 times slower depending on if it is a console app or a WPF app.

This gives me a bit of relief... but does anyone know why this takes so darn long when the debugger is attached?