mirror of
https://github.com/thoughtbot/factory_bot_rails.git
synced 2022-11-09 11:49:18 -05:00
Optimize for JRuby 32/64 bit differences
This commit is contained in:
parent
4a236a29e4
commit
8f48234356
1 changed files with 8 additions and 1 deletions
|
@ -9,6 +9,13 @@ end
|
|||
Aruba.configure do |config|
|
||||
config.before_cmd do |cmd|
|
||||
set_env('JRUBY_OPTS', "-X-C #{ENV['JRUBY_OPTS']}") # disable JIT since these processes are so short lived
|
||||
set_env('JAVA_OPTS', "-d32 #{ENV['JAVA_OPTS']}") # force jRuby to use client JVM for faster startup times
|
||||
|
||||
java_options = ENV['JAVA_OPTS']
|
||||
|
||||
if 1.size == 4 # 4 for 32 bit java, 8 for 64 bit java.
|
||||
set_env('JAVA_OPTS', "-d32 #{java_options}")
|
||||
else
|
||||
set_env('JAVA_OPTS', "-XX:+TieredCompilation -XX:TieredStopAtLevel=1 #{java_options}")
|
||||
end
|
||||
end
|
||||
end if RUBY_PLATFORM == 'java'
|
||||
|
|
Loading…
Reference in a new issue