-
Notifications
You must be signed in to change notification settings - Fork 42
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
Newer V8 code caching features #6
Comments
@hashseed Any updates on if or when these things might make it into Node? |
This new API I mentioned here should be in Node.js once it upgrades to V8 6.5. It might need to be exposed via vm module to become easily accessible though. |
Is it available now we have Node 10? |
It's getting there, but not quite in Node 10 yet. Maybe we'll still get it before the Node 10 LTS ship sails :) |
@hashseed I think this isn't in Node yet, do you happen to know if there are plans to expose it? I've looked at |
This is already in Node 10.6.0 and above. We should attempt to fix this. Here is an example: vercel/ncc#112 by @guybedford |
Very interesting project. I think you can benefit from some of the newer features we added to code caching in V8.
The current API compiles the top-level code and immediately puts that compilation result into the code cache. Inner functions are compiled lazily and not included in the cache. We recently introduced a new compile option that forces V8 to compile every function in the source so that we end up with more data in the code cache.
We also introduced a new API to produce the code cache not immediately after compilation, but at a later point when some execution might already have happened, at which point we may have compiled more functions.
I know none of this are yet available in Node.js since the newest V8 has not rolled into Node.js yet, and even then you have to expose these new API in a suitable way.
But I thought this might interest you in the long run.
The text was updated successfully, but these errors were encountered: