-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Share side modules with worker threads via postMessage #19390
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sbc100
force-pushed
the
shared_modules
branch
3 times, most recently
from
May 23, 2023 23:38
e9d53e4
to
336daa3
Compare
sbc100
force-pushed
the
shared_modules
branch
3 times, most recently
from
May 24, 2023 00:33
5bcc37b
to
4883bf6
Compare
sbc100
force-pushed
the
shared_modules
branch
2 times, most recently
from
May 24, 2023 19:13
35af5a7
to
e045661
Compare
sbc100
added a commit
that referenced
this pull request
May 24, 2023
Also move the function in question so it is declared alongside its users (its was previously in a different `#if` block). Split out from #19390
sbc100
added a commit
that referenced
this pull request
May 24, 2023
Also move the function in question so it is declared alongside its users (its was previously in a different `#if` block). Split out from #19390
sbc100
added a commit
that referenced
this pull request
May 24, 2023
Also move the function in question so it is declared alongside its users (its was previously in a different `#if` block). Split out from #19390
I've already split several PRs out from this one.. and I could split a couple more perhaps. But PTAL and see what you think? |
kripken
reviewed
May 24, 2023
sbc100
added a commit
that referenced
this pull request
May 24, 2023
These are all the NFC parts of #19390.
sbc100
force-pushed
the
shared_modules
branch
2 times, most recently
from
May 25, 2023 17:43
68c4cc8
to
f5f159d
Compare
sbc100
added a commit
that referenced
this pull request
May 25, 2023
Previously we were calling `loadDylibs` in the `run` function but we can call it earlier as soon as the main module is instantiated. This saves a little on code size since it relies on the existing `runDependencies` mechanism. Split out from #19390
sbc100
added a commit
that referenced
this pull request
May 25, 2023
Previously we were calling `loadDylibs` in the `run` function but we can call it earlier as soon as the main module is instantiated. This saves a little on code size since it relies on the existing `runDependencies` mechanism. Split out from #19390
sbc100
added a commit
that referenced
this pull request
May 25, 2023
Previously we were calling `loadDylibs` in the `run` function but we can call it earlier as soon as the main module is instantiated. This saves a little on code size since it relies on the existing `runDependencies` mechanism. Split out from #19390
sbc100
added a commit
that referenced
this pull request
May 25, 2023
Previously we were calling `loadDylibs` in the `run` function but we can call it earlier as soon as the main module is instantiated. This saves a little on code size since it relies on the existing `runDependencies` mechanism. Split out from #19390
Rebased on top of move_loadDylibs |
kripken
approved these changes
May 25, 2023
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.
Much easier to understand now, thanks!
lgtm % question
sbc100
added a commit
that referenced
this pull request
May 25, 2023
Previously we were calling `loadDylibs` in the `run` function but we can call it earlier as soon as the main module is instantiated. This saves a little on code size since it relies on the existing `runDependencies` mechanism. Split out from #19390
sbc100
force-pushed
the
shared_modules
branch
2 times, most recently
from
May 25, 2023 22:49
b0fefa4
to
762624b
Compare
Any side modules that are loaded at the time of worker creation are shared with the worker via the initial postMessage. As a followup we should extend this to modules that are loaded after the worker is created but before the pthread runs (for example when a module is loaded while a worker is unused). Fixes: #18552
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Any side modules that are loaded at the time of worker creation are
shared with the worker via the initial postMessage.
As a followup we should extend this to modules that are loaded after
the worker is created but before the pthread runs (for example when
a module is loaded while a worker is unused).
Fixes: #18552