Avoid repeated warm request dispatch work
This commit is contained in:
@@ -152,6 +152,11 @@ host imports into a store-independent Wasmtime `InstancePre`, and births then
|
||||
drops one empty workspace. This preserves Wasmtime's fork boundary while
|
||||
preventing the first request assigned to each worker from paying engine, linker,
|
||||
or pre-instantiation startup.
|
||||
Server configuration is immutable by that point. The worker therefore retains
|
||||
one native `DValue` view of it; each request's temporary context tree references
|
||||
that view while UCEB is encoded, avoiding a repeated native tree copy. The guest
|
||||
still decodes the bytes into its fresh request tree. Request parameters, body,
|
||||
cookies, session, call data, and response state are never retained this way.
|
||||
Startup duration or failure is written to the service log. The serialized core
|
||||
module lives in the configured writable cache root rather than beside the
|
||||
possibly root-owned deployed `core.wasm`; freshness still uses the deployed
|
||||
@@ -260,6 +265,12 @@ module cache, adding a visible cold-start request. Request state remains bounded
|
||||
by the fresh workspace and the normal per-request database/resource cleanup;
|
||||
faulted workers still exit and are replaced by the parent.
|
||||
|
||||
A warm entry artifact is checked for compiler/source freshness once before
|
||||
dispatch. A missing or stale artifact is compiled (or demand-prioritized) and
|
||||
then checked again before execution. The second check belongs only to that
|
||||
state-changing branch; repeating it immediately after a successful warm check
|
||||
adds no freshness guarantee.
|
||||
|
||||
The request context remains UCEB2 so application `context.call` semantics do
|
||||
not fork into a private transport type. Validated decode trees move into the
|
||||
request rather than being deep-copied twice; the historical by-value
|
||||
|
||||
Reference in New Issue
Block a user