Hide Forgot
User has an environment that creates JavaScript "rules" and executes them. It was noticed that with java-1.7.0-openjdk using rhino it runs almost 20 times faster. A similar bug report to upstream exists at https://bugs.openjdk.java.net/browse/JDK-8034959 [more information follow]
Created attachment 1221905 [details] 1.7.0-perf.txt Sample perf output when running with java-1.7.0-openjdk (rhino)
Created attachment 1221907 [details] 1.8.0-perf.txt Sample perf output when run with java-1.8.0-openjdk (nashorn)
User's test creates new short lived javascript functions that are executed in a loop. Nashorn is not designed to handle such workload efficiently: each new function is compiled to bytecodes so with nashorn a big part of this test's execution is spent spinning bytecodes. As pointed above this is a known issue upstream and it seems the recommendation is to use rhino with jdk 8: https://wiki.openjdk.java.net/display/Nashorn/Using+Rhino+JSR-223+engine+with+JDK8
Should, or does rhel 6 and 7, already have a package with rhino ready to use with jdk 8?
Replying to myself, and adding needinfo. https://admin.fedoraproject.org/pkgdb/package/rpms/rhino/ needs epel6 and epel7 branches, or, a rhel package. Should also update to Rhino 1.7.7.1 released February 2, 2016.
Please ignore the request for rhino epel branch. For some reason I did not find it was in rhel already. So, the solution currently should be to use rhel rhino and procedures described at https://wiki.openjdk.java.net/display/Nashorn/Using+Rhino+JSR-223+engine+with+JDK8
Paulo: is there anything any more you need from us? Should we close that bug now that there's a workaround?
Hi Roland, Yes, the bug can be closed. May thanks for your help.