Repository navigation
Backlog
Description
Question
When tools/startup/gfx2hlsl.py --watch (or compile_dxil --watch) has a backlog, how long does a request the application has just written wait for its manifest, and does processing newer requests first shorten that wait without changing any output?
Evidence so far
pending_keyssorts pending requests by file name, i.e. by key (tools/startup/gfx2hlsl.py:13848), andwatch_passtranslates the whole list before it scans again (:13738,:13746). A request written during a pass waits for the end of that pass.compile_dxil --watchdoes the same:collect_watch_requestssorts by marker path (tools/startup/compile_dxil.cpp:809,:828), andrun_watchprocesses the wholependingvector before the next scan (:944-1003).- Sources of a large backlog: the watcher's first pass retries every earlier failure once (
docs/startup-runtime.md:968,gfx2hlsl.py:13726), and a revision change followed by a re-key (docs/startup-runtime.md:1368-1373). The only timing on record: 3,513 requests took 56.9 s with one process and 7.8 s in parallel on 16 threads (docs/startup-runtime.md:985-986). - The runtime looks for an absent manifest again after 1 s, doubling up to 32 s (
docs/startup-runtime.md:963-964). - Inference, not measured: a pipeline the application has just requested waits behind every older request, and its draws stay "not drawn" meanwhile.
Completion condition
- Measure, from file times only: for each key, the time from its ready marker to its manifest (
<key>.txt, or<key>.ms57.txtfor mesh), on a synthetic cache with an old backlog and a few new requests, under the current order. - Repeat with an order that takes requests written since the watcher started first and rescans between batches.
- The set of files produced under both orders is byte-identical.
A follow-up tooling: PR would change the order only, with a test where the new request is published before the backlog ends and a negative control with the current order. Not in scope: how anything is translated.
Required environment
None for the gfx2hlsl.py half (pure-Python synthetic cache). Windows x64 and the Windows SDK for the compile_dxil half. A local cache is optional; only counts and durations from it would be posted.
Metadata
Metadata
Assignees
Labels
No labels
Activity
Leyukaka commentedon Nov 28, 2026
Working on this: an order-only change to
gfx2hlsl.py --watch(newest requests first, rescan between batches) with a pure-Python test and a negative control, plus the measurement from the completion condition.compile_dxil --watchafter that.