-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance issue - A lot of time for invoke js method #756
Comments
Hi, Thank you for reaching out about this, Could you please share the full example with steps to reproduce using GraalJS and other engines you've tested like V8, and we will take a look into it. |
the backend is something like
|
anyway, the issue is that with V8 wrapper to JAVA, it works much much faster. but with graaljs, it works much much slower my question is, should I use specific compiler for graaljs ? to optimize the process ? like JIT compiler ? how ? any example ? |
Hi @woess, can you take a look into this please? |
@omarmahamid could you please verify this issue with the newest build of graalJS, also please specify the version you were using before. Thank you |
can you please explain what changed since 23.0.0 and the new version 23.1.1 ? |
I can't comment on this without a runnable reproducer that demonstrates the performance problem. So my only advice would be to ensure that compiled code can be cached between runs, e.g. in case of multiple contexts evaluating the same sources, create the |
Hello All,
Describe the issue
I've encountered a performance problem while using the GraalVM Polyglot API to run JavaScript scripts as a script engine. The specific section of code that invokes the JavaScript function seems to have a significant delay, taking approximately 400 ms on average when executed 6,000 times.
Interestingly, when I attempted to run the same JavaScript code using Node.js in the WebStorm IDE, it only took about 20 ms. This stark difference in rendering time has me wondering if such a substantial delay is to be expected when using GraalVM Polyglot.
I noticed that other script engines, such as V8 and J2V8, tend to complete this task in approximately 50 ms, which further highlights the performance gap I'm encountering with GraalVM.
Below is the code snippet I'm using:
Code snippet or code repository that reproduces the issue
The text was updated successfully, but these errors were encountered: