JRuby AOT Compilation for All-in-One

2010-04-07 Thread Daniel Spiewak
http://paste.pocoo.org/show/198856/ This is a patch to run the JRuby ahead-of-time compiler against the *entire*Ruby distribution and installed gems prior to zipping for distribution. The motivations behind this are two-fold. First, the resulting .class files are substantially smaller than the

Re: JRuby AOT Compilation for All-in-One

2010-04-07 Thread Antoine Toulme
On Wed, Apr 7, 2010 at 11:23, Daniel Spiewak djspie...@gmail.com wrote: http://paste.pocoo.org/show/198856/ This is a patch to run the JRuby ahead-of-time compiler against the *entire*Ruby distribution and installed gems prior to zipping for distribution. The motivations behind this are

Re: JRuby AOT Compilation for All-in-One

2010-04-07 Thread Antoine Toulme
This would represent a huge performance gain for Buildr! Thanks for putting it together. Antoine On Wed, Apr 7, 2010 at 11:23, Daniel Spiewak djspie...@gmail.com wrote: http://paste.pocoo.org/show/198856/ This is a patch to run the JRuby ahead-of-time compiler against the *entire*Ruby

Re: JRuby AOT Compilation for All-in-One

2010-04-07 Thread Daniel Spiewak
Actually, according to Charles Nutter, this probably isn't the best idea. Apparently AOT compilation is mostly just good for obfuscation, it doesn't improve performance much (if at all). In fact, it actually hurts startup performance because there's more bytecode to verify. So, let's not go down

Re: JRuby AOT Compilation for All-in-One

2010-04-07 Thread Daniel Spiewak
Note: by gem dependencies I mean at the project level. Buildr's own gem dependencies (like Antwrap) would be in the clear. Daniel On Wed, Apr 7, 2010 at 3:19 PM, Daniel Spiewak djspie...@gmail.com wrote: Actually, according to Charles Nutter, this probably isn't the best idea. Apparently AOT

Re: JRuby AOT Compilation for All-in-One

2010-04-07 Thread Daniel Spiewak
Instead of AOT compilation, what we could look into is bundler ( http://github.com/carlhuda/bundler). This will allow us to create a static bundle which directly references all of the gems we need without actually loading rubygems. This would be hugely advantageous in terms of startup

Re: JRuby AOT Compilation for All-in-One

2010-04-07 Thread Antoine Toulme
For Buildr4OSGi, I would need to create my own distribution of Buildr that includes the Buildr4OSGi gem. Before long, you'll get a mess. It's still a valuable option imo. I really thought AOT was helping. I think there was a way to build buildr as an executable jar or something - oh well, I

Re: JRuby AOT Compilation for All-in-One

2010-04-07 Thread Charles Oliver Nutter
On Wed, Apr 7, 2010 at 3:42 PM, Antoine Toulme anto...@lunar-ocean.com wrote: For Buildr4OSGi, I would need to create my own distribution of Buildr that includes the Buildr4OSGi gem. Before long, you'll get a mess. It's still a valuable option imo. You can still *use* RubyGems if you want, but