Nailgun is a tool that speeds up Java command startup by punting
commands to an always-running “server” JVM. The improvement for JRuby is
substantial, with bare-bones startup times improving tenfold.
There’s work to be done, like to get signals to forward from the client
to the server and to more easily manage server instances, but it’s a
good start. We’re looking for people to try it out (to be released in
RC2 soon) and give us feedback.
Here’s a short sample session using JRuby with Nailgun:
~/projects/jruby âž” cd tool/nailgun/ ; make ; cd -
Building ng client. To build a Windows binary, type ‘make ng.exe’
gcc -Wall -pedantic -s -O3 -o ng src/c/ng.c
ld warning: option -s is obsolete and being ignored
~/projects/jruby âž” jruby --ng-server
NGServer started on all interfaces, port 2113.
+ Stopped jruby --ng-server
~/projects/jruby âž” bg
+ jruby --ng-server &
~/projects/jruby âž” jruby --ng -e “puts 1”
~/projects/jruby âž” time jruby -e “puts 1”
~/projects/jruby âž” time jruby --ng -e “puts 1”