Through some work done for
SERVER-993, we discovered that there could be a considerable performance benefit in at least some scenarios to having Puppet Server use the "compile.mode" setting of JIT instead of the Puppet Server default of OFF when initializing JRuby ScriptingContainers.
To allow for others to experiment with this for performance, it might be good to expose this as a configurable setting, e.g., via the jruby-puppet section in Trapperkeeper configuration, rather than having it just be hard-coded / unchangeable in Puppet Server code - see https://github.com/puppetlabs/puppet-server/blob/puppet-server-2.2.0/src/clj/puppetlabs/services/jruby/jruby_puppet_internal.clj#L35.
Probably best to stick with OFF as the default value for now until such time as we might have done sufficient characterization to recommend the use of JIT. Note that JIT is the default value used when running JRuby from the command line.
For more about the compile.mode setting, see https://github.com/jruby/jruby/wiki/JRubyCompiler#tweaking-and-troubleshooting.