Skip to content

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

@Centril

Description

@Centril

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_*__.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions