Cucumber on IronRuby incredibly slow to start?

一笑奈何 提交于 2020-02-02 12:50:28

问题


I'm using IronRuby 0.9.1 and cucumber 0.4.0. I also have MRI 1.8 installed.

I've created the following wrapper script (icucumber.bat) to run cucumber on IronRuby

@ECHO OFF
REM This is to tell IronRuby where to find gems.
SET GEM_PATH=c:\ruby\lib\ruby\gems\1.8
@"C:\ironruby\bin\ir.exe" "c:\ruby\bin\cucumber" %* 

Navigating to cucumber-0.4.0\examples\i18n\en and running:

cucumber features  // takes about 4 seconds to complete
icucumber features // takes about 30 seconds to complete

Cucumber on IR is MUCH slower to initialize, so it seems. Is this typical? Or did I set this up incorrectly?


回答1:


For me it takes about 10 seconds to start cucumber. Startup time is currently problematic in IronRuby but the team is working on it. You can find comfort in the fact that IronRuby, after it starts, works much faster than MRI (some say twice as fast!).

Shay.




回答2:


We have experienced the same behavior. This is probably related to a bug in IronRuby, because as far as I've heard, it was faster with the previous versions.

Partly because of this problem, and also because of others, like the build integration issues we have launched an open-source project, SpecFlow, that aims to provide better cucumber experience for the .NET users.




回答3:


It helps a lot if you ngen the IronRuby assemblies.

Whenever I install a new version of IronRuby, I always run this in a command prompt:

cd [the ironruby bin dir]
for %i in (*.dll) do C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe %i
C:\Windows\Microsoft.NET\Framework\v2.0.50727\ngen.exe ir.exe


来源:https://stackoverflow.com/questions/1562733/cucumber-on-ironruby-incredibly-slow-to-start

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!