Reduce WASM startup time / call-reducer time by memoizing and more direct calls #2300
Labels
backward-compatible
enhancement
New feature or request
performance
A PR/Issue related to improving performance of stdb
Currently, when the WASM module crashes, we must first do an expensive
__describe_module__
call, but we could instead store the extractedRawModuleDef
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 tableREDUCERS
. Instead, we could host->module call__call_reducer_foobar__
.This could be done backwards compatibly by checking if there are any
__call_reducer_*__
.The text was updated successfully, but these errors were encountered: