This afternoon I have been reading some interesting posts about speeding up jRuby when it is run embedded into JVM, I have arrived to next conclusions:
- some flags, mostly related with jRuby can be set programmatically. so DONE.
- some flags are related to JVM, and its version. (For example --client only in 32 bits JVM, or -XX:+TieredCompilation introduced in JDK7). PROBLEM.
In last case, this attributes are set using JRUBY_OPTS. So we have got two approaches, the first one, set and unset JRUBY_OPTS inside Asciidoctor java class before starting JRuby (it should work but I have not tried), or leave that responsibility to the user of the library. First approach has a big disadvantage, which of all flags we set? what's happening if let's say in JDK 8 an attribute is changed, ..., but of course user has not to worry about all these parameters.
The other approach, I think it is better because users will be able to set the parameters they think are the best one. (User knows version of JDK they are running Asciidoctor so can decide the best flags). But of course this require some knowledge that maybe he/she doesn't have it. But we can write a section in documentation with a table of options depending on JDK, so if user wants more speed can consult it and configure RUBY_OPTS properly.
What you think?
http://discuss.asciidoctor.org/Faster-JRuby-execution-tp130p159.htmlIf you reply to this email, your message will be added to the discussion below:To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML
Free forum by Nabble | Edit this page |