Skip to content

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Aug 28, 2025

Instead we can just delay the run call until after the async createWasm function returns/resolves.

This results in a nice code size saving.

Instead we can just delay the `run` call until after createWasm is
resolved.

This results in a nice code size saving.
@sbc100 sbc100 requested a review from kripken August 28, 2025 23:09
#else
// With async instantation wasmExports is assigned asynchronously when the
// instance is received.
createWasm();
createWasm().then(() => run());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this will delay preRun (including preloading data files) until the wasm is ready, but I think before we could do them in parallel?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe, but we already that just above where we await createWasm. I will check..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants