Mark Watson’s Artificial Intelligence Books and Blog

Share this post

Using nailgun for faster JRuby startup

markwatson.com

Using nailgun for faster JRuby startup

Mark Watson
Oct 28, 2009
Share

I finally got around to trying nailgun tonight. On OS X with JRuby 1.4.0RC2, I built nailgun using:

cd JRUBY_HOME/tool/nailgun
./configure
make  # I ignored the warning "no debug symbols in executable (-arch x86_64)"

In one terminal window just leave a nailgun server running:

$ jruby --ng-server
NGServer started on all interfaces, port 2113.

When you want to run JRuby as a railgun client, try something like:

jruby --ng text-resource.rb

On my MacBook, this cuts about 5 seconds of JRuby startup time off of running this test program.

Sweet. For small programs, using ruby is still faster than jruby but this makes developing with JRuby faster.

Share
Comments
Top
New

No posts

Ready for more?

© 2023 Mark Watson
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing