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
how to impove performance for a amount of constant literal in a javascript file #566
Comments
I disable cache lookup with Program.values, the performance is same as node. |
Hi. Could you provide more details about the code you're running and how you're running it, and the change you made? |
@dop251 when I change
to
the performance is close to node. this change disable cache lookup for literal values in Program becasue text-encoding/lib/encoding-indexes.js have a amount of literal, every literal traverses search Program.values with many items, every item's compare it with SameAs function( it call reflect to cast type). it is a slow mechanism in this case |
thanks, it's working |
I use goja as a runtime for execute javascript file. but when require text-encoding modules into goja's runtime. It's incredibly slow.
I profile it, found most cost of cpu was in Goja (* Program). defineLiteralValue.
the modules text-encoding has a amount of constant literal. Is there a way to improve performance?
thx~
The text was updated successfully, but these errors were encountered: