-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
bootstrap: use the embedded snapshot in workers #42702
Conversation
Review requested:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
Does it unblock |
This comment was marked as outdated.
This comment was marked as outdated.
Pending CI benchmark: https://ci.nodejs.org/view/Node.js%20benchmark/job/benchmark-node-micro-benchmarks/1128/ |
The startup benchmark is still broken. See #42437 |
@targos Yes :) (at least locally) |
4c6264f
to
4128055
Compare
Looks like Windows is having trouble compiling the first commit, but I cannot reproduce it on Windows locally. Trying to tweak that patch a bit and see how I can make the Windows CI happy.. |
So that the embedded snapshot can be reused by the worker.
The heap size limit should be the sum of old generation and young generation size limits, and does not solely depend on the limit of the old generation. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
So that the embedded snapshot can be reused by the worker. PR-URL: nodejs#42702 Refs: nodejs#35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#42702 Refs: nodejs#35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
The heap size limit should be the sum of old generation and young generation size limits, and does not solely depend on the limit of the old generation. PR-URL: nodejs#42702 Refs: nodejs#35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
So that the embedded snapshot can be reused by the worker. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
The heap size limit should be the sum of old generation and young generation size limits, and does not solely depend on the limit of the old generation. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
So that the embedded snapshot can be reused by the worker. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
The heap size limit should be the sum of old generation and young generation size limits, and does not solely depend on the limit of the old generation. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
So that the embedded snapshot can be reused by the worker. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
The heap size limit should be the sum of old generation and young generation size limits, and does not solely depend on the limit of the old generation. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
So that the embedded snapshot can be reused by the worker. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
The heap size limit should be the sum of old generation and young generation size limits, and does not solely depend on the limit of the old generation. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
So that the embedded snapshot can be reused by the worker. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
The heap size limit should be the sum of old generation and young generation size limits, and does not solely depend on the limit of the old generation. PR-URL: #42702 Refs: #35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
So that the embedded snapshot can be reused by the worker. PR-URL: nodejs/node#42702 Refs: nodejs/node#35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs/node#42702 Refs: nodejs/node#35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
The heap size limit should be the sum of old generation and young generation size limits, and does not solely depend on the limit of the old generation. PR-URL: nodejs/node#42702 Refs: nodejs/node#35711 Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: James M Snell <[email protected]>
bootstrap: move embedded snapshot to SnapshotBuilder
So that the embedded snapshot can be reused by the worker.
bootstrap: use the embedded snapshot in workers
Use the isolate snapshot and the default context snapshot from
the embedded snapshot in workers.
test: fix calculations in test-worker-resource-limits
The heap size limit should be the sum of old generation and young
generation size limits, and does not solely depend on the limit
of the old generation.
Refs: #35711
It seems the workers have no problem sharing the isolate snapshot and the default context snapshot with the main instance (thanks @legendecas for the idea), at least the tests pass locally for me.