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 have observed that when using miniracer with our precompile assets process memory can run away big time.
This is cause sprockets often bloats the heap and at the point execjs is called there are extra v8 contexts sitting around in a bloated heap that just is too big to run a GC cause so much is free in it.
Trouble is a v8 context can easily consume 100+MB of RSS.
I was wondering if we could add to execjs a concept of "OK, I am done with the context"
Once that is called, MiniRacer could release the v8 context and reclaim all the memory. This means that usage wise if you want to reclaim memory early you would do:
context = ExecJS.compile(source)
context.call("CoffeeScript.compile", "square = (x) -> x * x", bare: true)
context.release
context.call("X") => raises error cause context is done and poison at this point.
Clearly implementation would be optional.
Thoughts ?
The text was updated successfully, but these errors were encountered:
I have observed that when using miniracer with our precompile assets process memory can run away big time.
This is cause sprockets often bloats the heap and at the point execjs is called there are extra v8 contexts sitting around in a bloated heap that just is too big to run a GC cause so much is free in it.
Trouble is a v8 context can easily consume 100+MB of RSS.
I was wondering if we could add to
execjs
a concept of "OK, I am done with the context"Once that is called, MiniRacer could release the v8 context and reclaim all the memory. This means that usage wise if you want to reclaim memory early you would do:
Clearly implementation would be optional.
Thoughts ?
The text was updated successfully, but these errors were encountered: