Asciidoctor.js on Nashorn JDK 9 is considerably slower than Nashorn JDK 8
grossetieg at gmail.com
Wed Mar 18 12:36:33 UTC 2015
Thanks for your reply, I will give it a try and let you know.
2015-03-16 13:59 GMT+01:00 Marcus Lagergren <marcus.lagergren at oracle.com>:
> Yes. This probably has to do with optimistic typing being enabled to
> slower at startup because we generate more correct code (and throw away too
> optimistic code that we generate first).
> 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>
> > 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
> > 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
> > 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
> > ms*
> > Running Nashorn java AsciidoctorConvertWithNashorn... OK in *30584.749
> > As you can see basic.js runs a little faster but asciidoctor-convert.js
> > 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.
> > Cheers,
> > Guillaume
> > 
> > 
> > 
> > 
> >  http://opalrb.org/
> > 
More information about the nashorn-dev