Sha256: e9d5129e3f6f7f634067c4a7b675229922ddf19296f997aec80a8080f5345a2d

Contents?: true

Size: 713 Bytes

Versions: 13

Compression:

Stored size: 713 Bytes

Contents

require 'rbconfig'

# ideas taken from: http://blog.headius.com/2010/03/jruby-startup-time-tips.html
Aruba.configure do |config|
  config.before :command do
    next unless RUBY_PLATFORM == 'java'

    # disable JIT since these processes are so short lived
    ENV['JRUBY_OPTS'] = "-X-C #{ENV['JRUBY_OPTS']}" unless (ENV['JRUBY_OPTS'] || '') .include? '-X-C'

    # Faster startup for jruby
    ENV['JRUBY_OPTS'] = "--dev #{ENV['JRUBY_OPTS']}" unless (ENV['JRUBY_OPTS'] || '').include? '--dev'

    # force jRuby to use client JVM for faster startup times
    ENV['JAVA_OPTS'] = "-d32 #{ENV['JAVA_OPTS']}" if RbConfig::CONFIG['host_os'] =~ /solaris|sunos/i && !(ENV['JAVA_OPTS'] || '').include?('-d32')
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
aruba-1.0.0.pre.alpha.4 lib/aruba/config/jruby.rb
aruba-1.0.0.pre.alpha.3 lib/aruba/config/jruby.rb
aruba-0.14.9 lib/aruba/config/jruby.rb
aruba-0.14.8 lib/aruba/config/jruby.rb
aruba-0.14.7 lib/aruba/config/jruby.rb
aruba-0.14.6 lib/aruba/config/jruby.rb
aruba-0.14.5 lib/aruba/config/jruby.rb
aruba-0.14.4 lib/aruba/config/jruby.rb
aruba-0.14.3 lib/aruba/config/jruby.rb
aruba-1.0.0.pre.alpha.2 lib/aruba/config/jruby.rb
aruba-1.0.0.pre.alpha.1 lib/aruba/config/jruby.rb
aruba-win-fix-0.14.2 lib/aruba/config/jruby.rb
aruba-0.14.2 lib/aruba/config/jruby.rb