Load viewer and inspector details on demand with bounded memory
Extend bounded-memory recording consumption to viewer and JSON inspector. Reuse validated immutable binary snapshot index with random event access, build lightweight overview/naming data by streaming, and retrieve full event details only on demand through a bounded shared cache. Preserve frame/timing/pass selectors, names, all inspector JSON details and availability/error semantics; paginate before detail serialization and stream raw event JSON pages to avoid holding many decoded events/JSON trees. Full decoding once at opening may remain necessary for overview with current format. No game launches or existing capture edits, no commits. Prior uncommitted summary fix is related and must remain intact. Acceptance: file-backed viewer model and inspector handle synthetic large detail payloads under process memory limits, navigation/detail/raw results match in-memory behavior, corruption/snapshot behavior remains explicit, workspace tests/check/Clippy and release builds pass. Verified implementation: SnapshotReader pins inode/index and validates random access; Model::open serially scans and observes stable names then retains lightweight scopes/counters/pass identities only. Full event retrieval uses a single-entry 64 MiB estimated-owned-memory cache, releases old cached events before decode, and leaves oversized events uncached. Selected region/pass/draw UI paths retrieve exact full events with explicit load errors. Inspector streams raw-event and draw pages, expands only selected draw states and serializes region metadata without cloning or serializing draw inventory. Eager Trace API remains available. README/format docs describe scan time, overview/index/name scaling, largest-event transient memory and cache-vs-process-budget limits. Validation: synthetic 768 MiB decoded draw-label fixture passes summary, headless egui viewer navigation/detail rendering and inspector output in separate 256 MiB address-space-limited children; temporarily restoring eager Trace::open in Model::open reproduces allocation failure. Additional 384 MiB expanded interned-state draw JSON streams under the same limit. File-backed vs in-memory parity covers all inspector commands/page boundaries, UI rendered text/navigation/repeated passes/transfer details, resource naming/effective state; cache reuse/release and pinned snapshot compaction/index fallback/corruption/header tests pass. 84 active workspace tests pass; one pre-existing storage stress remains ignored. Formatting, workspace check, strict all-target Clippy, diff checks and release workspace build pass. Static parallel review found no actionable findings (did not execute tests/GPU). Native release Vulkan smoke separately passed on RX 9070, rendered 3 frames of synthetic 384-frame/768 MiB-label capture with --pass 1 and screenshot visually inspected; viewer peak RSS 53,480 KiB, inspector 11,996 KiB (synthetic-specific measurements, not general caps). Release inspector output JSON effective state and full 2 MiB label verified. Evidence/source/capture/screenshot under ignored target/lazy-viewer-smoke*; no games launched or existing captures changed. All changes remain uncommitted.
Checklist
3 of 3 complete- Implement shared pinned snapshot random access, streamed overview construction and bounded detail cache for viewer/inspector.
- Preserve JSON output while paginating before serialization and streaming raw event pages.
- Verify bounded-memory file-backed navigation/detail/output regressions, errors and workspace/release validation.
- Area
- Personal tooling
- Project
- Wayrender
- Kind
- Bug
- Task ID
tsk_dd4b8yp8bd- Updated