You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I checked CJS builtinNode and found that all cjs source loaded through this method: com.oracle.truffle.js.builtins.GlobalBuiltins.JSFileLoadingOperation#sourceFromTruffleFile.
When same file was loaded to different contexts, it generated different com.oracle.truffle.api.source.Source instance.
In my view, it will lead to repeated code parsing, JIT compiling, and a lot of other waste, I think it's the main reason for memory abnormal usage.
I'd like to know is there a way around, to let the same file loaded as same com.oracle.truffle.api.source.Source instance.
In other words, it's allowing setting engine level file system to share cjs files among multiple contexts.
using GraalVM 22.1.0 with GraalJS 22.1.0;
Ubuntu+Mac
The text was updated successfully, but these errors were encountered:
when I want to have a test, I found the Endorse Mechanism doesn't work on JDK11/17,
Is there a way to let me test this, or is there anyone write something about this ?
Could you please verify with the latest version of GraalVM (22.3.2) if the issue is still there please share a reproducer example that illustrate the issue. thank you
Could you please verify with the latest version of GraalVM (22.3.2) if the issue is still there please share a reproducer example that illustrate the issue. thank you
Is there any modification at 22.3.2 ?
I'll have a try
I found graal-js used a lot of memory to hold the CJS loaded Source ,which bothered me alot;
I enabled cjs like this, using a protected in memory file system:
When about 50+ context (shared with one engine) created and loaded a lot of cjs module separately, I noticed that memory usage reached high;
heap histogram like this ,and almost all Source is cjs module;
I checked CJS builtinNode and found that all cjs source loaded through this method:
com.oracle.truffle.js.builtins.GlobalBuiltins.JSFileLoadingOperation#sourceFromTruffleFile
.When same file was loaded to different contexts, it generated different
com.oracle.truffle.api.source.Source
instance.In my view, it will lead to repeated code parsing, JIT compiling, and a lot of other waste, I think it's the main reason for memory abnormal usage.
I'd like to know is there a way around, to let the same file loaded as same
com.oracle.truffle.api.source.Source
instance.In other words, it's allowing setting engine level file system to share cjs files among multiple contexts.
using GraalVM 22.1.0 with GraalJS 22.1.0;
Ubuntu+Mac
The text was updated successfully, but these errors were encountered: