Uh oh!
There was an error while loading. Please reload this page.
sea: add support for V8 bytecode-only caching - #48191
Conversation
nodejs-github-bot
commented
May 26, 2023
Review requested:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
joyeecheung
left a comment
There was a problem hiding this comment.
I don't think this includes any tests for the new feature? We should at least have some to exercise the code paths..
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
RaisinTen
commented
Jun 2, 2023
This change generates the code cache and uses it by default, so the existing E2E SEA tests should already be exercising the added code paths, right? |
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Thanks, this is great! I left some nits
(One last note wrt startup time: it's unfortunate that we store the source code as UTF8 because then we need to transcode/copy it into Latin1/UTF16 in order to actually put it into V8. Ideally we'd use external strings instead. That's not really related to this diff, but thought I'd note it since we're one the subject. :)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I think this could be made configurable because storing the strings as UTF8 could save quite some space if the source actually contains two-byte characters, which may be more important to users than the startup cost depending on their use case. |
Refs: https://github.com/nodejs/node/pull/48191/files/300f3f4a03d7f418fb565a479f19b67c22d80a07#r1269601154 Signed-off-by: Darshan Sen <raisinten@gmail.com>
Signed-off-by: Darshan Sen <raisinten@gmail.com>
300f3f4 to
91bf2dfCompareRaisinTen
commented
Jul 21, 2023
Done @joyeecheung, PTAL |
This comment was marked as outdated.
This comment was marked as outdated.
nodejs-github-bot
commented
Jul 26, 2023
nodejs-github-bot
commented
Jul 26, 2023
Landed in 6cd6789 |
Refs: nodejs/single-executable#73 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#48191Fixes: nodejs/single-executable#73 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Refs: nodejs/single-executable#73 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#48191Fixes: nodejs/single-executable#73 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Refs: nodejs/single-executable#73 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#48191Fixes: nodejs/single-executable#73 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Refs: nodejs/single-executable#73 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: nodejs#48191Fixes: nodejs/single-executable#73 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Refs: nodejs/single-executable#73 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #48191Fixes: nodejs/single-executable#73 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Refs: nodejs/single-executable#73 Signed-off-by: Darshan Sen <raisinten@gmail.com> PR-URL: #48191Fixes: nodejs/single-executable#73 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This improves the startup performance of SEAs.
For example, the comparison of the startup performance benchmarks of a Node.js SEA built using the CJS bundle of Yarn's source code shows a 24% improvement on my
x86_64macOS:Fixes: nodejs/single-executable#73
cc @kvakil