Precompile native modules off request path

This commit is contained in:
udo
2026-07-16 22:51:16 +00:00
parent a247c2b520
commit 8dd307d316
6 changed files with 84 additions and 8 deletions
+2
View File
@@ -178,6 +178,8 @@ When a current serialized module exists, the worker scans wasm section headers
and reads only `dylink.0` and `uce.abi`; it does not fault the multi-megabyte code
and data bodies into every new worker. A missing/stale/invalid serialized module
still reads, validates, compiles, and republishes the complete wasm artifact.
The proactive compiler also creates that serialization immediately after source
compilation, keeping first-worker native compilation off the request path.
Cold module compilation and deserialization are host work, so `load_unit()`
refreshes the epoch deadline before its first guest call. Otherwise a component
whose compilation outlasted the guest CPU budget would immediately trap in the