Asciidoctor.js on Nashorn JDK 9 is considerably slower than Nashorn JDK 8
marcus.lagergren at oracle.com
Mon Mar 16 12:59:26 UTC 2015
Try running with —optimistic-types=false and see if you get back to 8-like performance and startup.
We have plans to cheapen startup time considerably until 9 FC.
You can also try using the code caching feature from 8u40:
> On 03 Jan 2015, at 21:01, Guillaume Grossetie <grossetieg at gmail.com> wrote:
> Hello everyone and happy new year!
> Asciidoctor.js is now running on both JDK 8b19 (build 25.40-b23) and JDK
> 9b44 (build 1.9.0-ea-b44).
> We noticed that JDK 9 is considerably slower than JDK 8 Nashorn but at the
> We have a simple Rake task that execute the same examples with the
> latest JDK 8 and JDK 9:
> *Result with JDK 8:*
> Running Nashorn jjs spec/share/basic.js... OK in *909.052 ms*
> Running Nashorn jjs spec/share/asciidoctor-convert.js... OK in *9335.534 ms*
> Running Nashorn java AsciidoctorConvertWithNashorn... OK in *8843.506 ms*
> AsciiDoc source to HTML5.
> *Result with JDK 9:*
> Running Nashorn jjs spec/share/basic.js... OK in *860.049 ms*
> Running Nashorn jjs spec/share/asciidoctor-convert.js... OK in *31253.788
> Running Nashorn java AsciidoctorConvertWithNashorn... OK in *30584.749 ms*
> As you can see basic.js runs a little faster but asciidoctor-convert.js is
> considerably slower (three times slower ~30 seconds).
> The basic.js, asciidoctor-convert.js and asciidoctor-all.js are
> available on GitHub.
> Asciidoctor.js is generated from Ruby using Opal as a result the
> file asciidoctor-all.js
> is not easy to read but the entry point is the method $convert.
> Let me know if you need more information.
>  https://github.com/asciidoctor/asciidoctor.js/blob/master/Rakefile#L105
>  http://opalrb.org/
More information about the nashorn-dev