Reuse loaded component units per request

This commit is contained in:
udo
2026-07-18 05:01:27 +00:00
parent 5e140d6a5a
commit a5ad5042b7
8 changed files with 133 additions and 62 deletions
+6 -2
View File
@@ -139,8 +139,12 @@ The request entry unit is already loaded by the host, so its selected handler
and optional `ONCE` export are placed directly into the workspace table and
passed to `uce_wasm_invoke_loaded_entry()`. Dynamic component and unit calls
continue through `wasm_resolve_target()`, where relative-path resolution is
required. Opt-in verbose response headers split entry invocation into load,
presence lookup, table linking, and core dispatch time.
required. Handler cache keys include the calling unit so identically named
relative targets in different directories cannot alias. Once a unit has passed
freshness checks and loaded into a request workspace, later handler lookups
reuse that immutable request-local instance; `component_loaded_reuse_count`
reports those lookups. Opt-in verbose response headers split entry invocation
into load, presence lookup, table linking, and core dispatch time.
`wasm_backend_should_handle(request, entry_unit)` checks whether the wasm
backend is initialized and the requested artifact/handler is currently