Keep demand compilation responsive
This commit is contained in:
@@ -233,7 +233,14 @@ whose compilation outlasted the guest CPU budget would immediately trap in the
|
||||
following allocator/relocation call even though no guest loop consumed it.
|
||||
|
||||
The proactive compiler and request workers coordinate through per-unit file
|
||||
locks and a lock-protected demand-priority queue under `BIN_DIRECTORY`. Unit
|
||||
locks and a lock-protected demand-priority queue under `BIN_DIRECTORY`. A small
|
||||
priority-only compiler process drains that queue independently of the full-site
|
||||
scanner. This matters when the scanner is already inside a long transitive C++
|
||||
compile: a requested stale component can rebuild immediately instead of waiting
|
||||
for that unrelated compile to finish. Both compiler processes use the same
|
||||
per-unit lock, so concurrent demand and scan discovery cannot publish duplicate
|
||||
artifacts. The priority worker is idle when there is no demand and never scans
|
||||
the site on its own. Unit
|
||||
compilation writes and validates a process-unique temporary wasm file, then
|
||||
publishes it with an atomic rename. When proactive compilation is enabled,
|
||||
read-only HTTP requests keep using the last complete artifact while requesting
|
||||
|
||||
Reference in New Issue
Block a user