Projects:Add JavaScript Engine/QA
Contents |
Performance
Performance testing for the new JS Engine and the new JS minifier.
Rhino JS engine
Rhino is the new JS engine that is being added by this project instead of Nashorn. Performance testing has been made to make sure it has no memory leaks and check that it works as expected.
Rhino performance on a load-test:
Heap and non-heap Memory
- Non-heap Memory: Rhino uses more non-heap memory(~250MB more at peak usage) than the previous engine, on the other hand, it uses less heap memory(~400MB less at peak usage).
For reference, this is the same load-test on the previous engine, Nashorn:
- More use of Heap memory, and less use of non-heap memory
Garbage collection logs have also been analyzed to make sure there's no memory leak in Rhino and there are none so far.
In terms of speed evaluating JS, both rhino and nashorn are very similar.
Concurrency
Concurrency has been tested by executing JavaScript evaluation method over a time consuming JS method several times with different thread counts and counting the average time to finish execution. This has been done for both rhino and nashorn JS engines.
In conclusion, Rhino JS is faster than Nashorn when executing with multithreading, while Nashorn is a bit faster than Rhino JS when in single-thread mode.
- Concurrency testing spreadsheet: https://docs.google.com/spreadsheets/d/1RLt6bsuEpuhJn7QsfIcnOkwpMYVi8l2SlZ3YOTF3NSQ/edit?usp=sharing
JSMin JavaScript minifier
Performance testing has been done to check the compression level between yui-compressor(removed in this project) and JSMin(used for minifying after yui removal).
- Minify testing spreadsheet: https://docs.google.com/spreadsheets/d/1Qpr-kGZQ0gJLfpeYQyzVeJv6QUFkn_aKeALcQLC3feA/edit#gid=0