Skip to content
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

Reduce WASM startup time / call-reducer time by memoizing and more direct calls #2300

Open
Centril opened this issue Feb 24, 2025 · 0 comments
Labels
backward-compatible enhancement New feature or request performance A PR/Issue related to improving performance of stdb

Comments

@Centril
Copy link
Contributor

Centril commented Feb 24, 2025

Currently, when the WASM module crashes, we must first do an expensive __describe_module__ call, but we could instead store the extracted RawModuleDef in the host instead, so we only ever have to call __describe__module__ when the module is published.
One impediment to this is that in the Rust rt.rs bindings, __call_reducer relies on __describe_module__ having been called so that the list of reducers gets built. We should try to break this dependency, also because it could mean that we could dispatch directly to the reducer rather than having a dispatch table REDUCERS. Instead, we could host->module call __call_reducer_foobar__.
This could be done backwards compatibly by checking if there are any __call_reducer_*__.

@Centril Centril added backward-compatible enhancement New feature or request performance A PR/Issue related to improving performance of stdb labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backward-compatible enhancement New feature or request performance A PR/Issue related to improving performance of stdb
Projects
None yet
Development

No branches or pull requests

1 participant