WasmtimeRuntime should cache compiled modules #14
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: canary/canary-rs#14
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
JIT compilation is slow.
WasmtimeRuntime
should cache compiled Wasm modules, both on disk (by enabling Wasmtime's built-in disk caching system) and in memory.To avoid storing large Wasm sources in memory as keys in a
HashMap
, we should use theprehash
crate to hash our module sources into anu64
key before entering them into the cache.Because compiled Wasm modules are very large, we may need a reaper to clean old cache entries if the cache takes up too much memory. I'm not sure how best to gauge used memory without serializing the compiled modules. As always, profile first!