-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Support caching/emitting bytecode #3335
Comments
The feature I was referring to is described here: https://github.com/v8/v8/blob/b4bfbce6f91fc2cc72178af42bb3172c5f5eaebb/include/v8.h#L1625-L1629 This will become more accessible after we replace libdeno with rusty-v8. We should also solve #1692 before attempting this. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@lucacasonato and I discussed this today. Besides required |
Any update on that ? |
It simply hasn't been a priority. The investment is high and the likely improvement in performance is questionable. While there are no blockers for it, there is a lot of other higher priority work for the core team. |
Would be great to see some progress on this issue. |
Just for curiousity in my case ! |
@lucacasonato In my case anything that can reduce startup time is welcome. In Dropserver [1] I run one Deno instance per app instance, and it gets shut off when the app instance is not in use (to free up resources). This means sometimes I have to start up an instance on an incoming HTTP request. As a result, the faster the startup time, the better. It's not clear from the comments above how much this feature might help startup time, but if it can, I'm all for it. Thanks! |
@lucacasonato Even tho, not a proper way of protecting the code, as long as there is no public V8 bytecode disassembler - it's a great feature to have. |
@lucacasonato not having to unzip the js to the user cache directory would make it easy to install cli deno apps as root that can be used by regular users. Right now we have to define an explicit cache dir. Bundling the bytecode might also speed up thins for CLI apps. |
There is. But for V8, bytecode is internal and changes based on different versions, so you could potentially need to have unique disassemblers for every version. |
We automatically use V8 code cache since 1.43 now (https://deno.com/blog/v1.43#faster-es-and-commonjs-module-loading). |
@ry mentioned to me that V8 supports a way to transpile modules to byte code. In theory we could persist that in the cache instead of JavaScript. Different than snapshots, which are code running in memory, this would be more like
.pyc
in Python.We could also potentially emit the bundles to that format as well.
The text was updated successfully, but these errors were encountered: