Re: [MacRuby-devel] Rspec Stopped Running Under Macruby
Christian, Reverting to Rspec 2.5 allowed rspec to run under macruby (so far.) However, it is extremely slow compared to running under system ruby. it takes 10+ seconds to run just an empty test and pegs out one of my cores to do so. Macruby should run faster than the system ruby 1.8.7 so I think I've still got a Macruby problem somewhere. Guess I need to do another post. Thanks, Shannon
I have the same (performance) issue too. I believe this is due to MacRuby's JIT, which compiles the ruby source into machine code using LLVM. This improves performance dramatically for long-running apps, but in our case it seems to cause a big up-front penalty. Does anyone else on list know if there is a way to disable the JIT? I'd love to do some performance comparisons and see if this helps. On May 20, 2011, at 11:50 AM, Shannon Love wrote:
Christian,
Reverting to Rspec 2.5 allowed rspec to run under macruby (so far.) However, it is extremely slow compared to running under system ruby. it takes 10+ seconds to run just an empty test and pegs out one of my cores to do so.
Macruby should run faster than the system ruby 1.8.7 so I think I've still got a Macruby problem somewhere. Guess I need to do another post.
Thanks, Shannon
Rspec 2.6 works on the macruby nightly builds. Load times are partly due to rubygems being very slow on MacRuby and rspec being split into 4 gems (plus one other external gem). The other problem is that you have to JIT all the code at run time; you should be able to cut the load time in half by compiling rspec and its dependencies, but that has a couple of caveats right now, you can read more about it in the README for my rubygems plugin: https://github.com/ferrous26/rubygems-compile Also, there are a couple of issues in the macruby trac related to slow gem loading time. You may wish to add a comment there about rspec. Mark Rada mrada@marketcircle.com On 2011-05-20, at 2:50 PM, Shannon Love wrote:
Christian,
Reverting to Rspec 2.5 allowed rspec to run under macruby (so far.) However, it is extremely slow compared to running under system ruby. it takes 10+ seconds to run just an empty test and pegs out one of my cores to do so.
Macruby should run faster than the system ruby 1.8.7 so I think I've still got a Macruby problem somewhere. Guess I need to do another post.
Thanks, Shannon _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
am i understanding the option being described here as manually forcing a pre-compile of .rb gems to .rbo cached to the gems directory (with caveats like no backtrace, ymmv)? anybody working on a generic (system-wide or per-user or configurable?) cache of arbitrary .rb -> .rbo similar to how rubyinline works, where llvm intermediaries being built are automatically cached and invalidated when the associated/underlying .rb changes? i would be interested to help if somebody is already in-flight with that, or take a stab it if nobody is -- lmk pls. thx, n@ On Fri, May 20, 2011 at 12:07 PM, Mark Rada <mrada@marketcircle.com> wrote:
Rspec 2.6 works on the macruby nightly builds.
Load times are partly due to rubygems being very slow on MacRuby and rspec being split into 4 gems (plus one other external gem).
The other problem is that you have to JIT all the code at run time; you should be able to cut the load time in half by compiling rspec and its dependencies, but that has a couple of caveats right now, you can read more about it in the README for my rubygems plugin:
https://github.com/ferrous26/rubygems-compile
Also, there are a couple of issues in the macruby trac related to slow gem loading time. You may wish to add a comment there about rspec.
Mark Rada mrada@marketcircle.com
On 2011-05-20, at 2:50 PM, Shannon Love wrote:
Christian,
Reverting to Rspec 2.5 allowed rspec to run under macruby (so far.) However, it is extremely slow compared to running under system ruby. it takes 10+ seconds to run just an empty test and pegs out one of my cores to do so.
Macruby should run faster than the system ruby 1.8.7 so I think I've still got a Macruby problem somewhere. Guess I need to do another post.
Thanks, Shannon _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
On 2011-05-20, at 3:28 PM, Nat Brown wrote:
am i understanding the option being described here as manually forcing a pre-compile of .rb gems to .rbo cached to the gems directory (with caveats like no backtrace, ymmv)?
Almost. You lose backtraces right now, but that is a temporary tradeoff; eventually MacRuby will be able to give backtraces for pre-compiled code. Also, there is the auto_compile command in the plugin that automatically compiles gems as you install them.
anybody working on a generic (system-wide or per-user or configurable?) cache of arbitrary .rb -> .rbo similar to how rubyinline works, where llvm intermediaries being built are automatically cached and invalidated when the associated/underlying .rb changes?
i would be interested to help if somebody is already in-flight with that, or take a stab it if nobody is -- lmk pls.
That sounds interesting and potentially very useful, but not too difficult to do. Unfortunately I am already in the middle of too many different projects so I wouldn't be able to help much. :(
thx, n@
Good luck, Mark Rada mrada@marketcircle.com
On Fri, May 20, 2011 at 12:07 PM, Mark Rada <mrada@marketcircle.com> wrote: Rspec 2.6 works on the macruby nightly builds.
Load times are partly due to rubygems being very slow on MacRuby and rspec being split into 4 gems (plus one other external gem).
The other problem is that you have to JIT all the code at run time; you should be able to cut the load time in half by compiling rspec and its dependencies, but that has a couple of caveats right now, you can read more about it in the README for my rubygems plugin:
https://github.com/ferrous26/rubygems-compile
Also, there are a couple of issues in the macruby trac related to slow gem loading time. You may wish to add a comment there about rspec.
Mark Rada mrada@marketcircle.com
On 2011-05-20, at 2:50 PM, Shannon Love wrote:
Christian,
Reverting to Rspec 2.5 allowed rspec to run under macruby (so far.) However, it is extremely slow compared to running under system ruby. it takes 10+ seconds to run just an empty test and pegs out one of my cores to do so.
Macruby should run faster than the system ruby 1.8.7 so I think I've still got a Macruby problem somewhere. Guess I need to do another post.
Thanks, Shannon _______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
On May 20, 2011, at 12:28 PM, Nat Brown wrote:
anybody working on a generic (system-wide or per-user or configurable?) cache of arbitrary .rb -> .rbo similar to how rubyinline works, where llvm intermediaries being built are automatically cached and invalidated when the associated/underlying .rb changes?
i would be interested to help if somebody is already in-flight with that, or take a stab it if nobody is -- lmk pls.
I'm not working on this, but I've been thinking this past week about the other direction -- distributing compiled code (frameworks, static libraries) in gems. There's no package manager in the Cocoa world and it'd be really nice to simplify the process of importing 3rd-party code. For example, take a look at Cedar: https://github.com/pivotal/cedar How nice would it be to reduce this install (along with OCMock and OCHamcrest) to something like 'gem install ...'? I'm spending some time over the next couple works playing with this idea. Maybe I'll have something to share by WWDC! christian.
participants (4)
-
Christian Niles
-
Mark Rada
-
Nat Brown
-
Shannon Love