phase 2 progress
This commit is contained in:
@@ -5,7 +5,7 @@ This note summarizes the main architectural improvements that would make the app
|
||||
Phase checklist:
|
||||
|
||||
- [x] Define subsystem boundaries and target architecture
|
||||
- [ ] Introduce an internal event model
|
||||
- [x] Introduce an internal event model
|
||||
- [x] Split `RuntimeHost`
|
||||
- [ ] Make the render thread the sole GL owner
|
||||
- [ ] Refactor live state layering into an explicit composition model
|
||||
@@ -16,7 +16,8 @@ Phase checklist:
|
||||
Checklist note:
|
||||
|
||||
- The checked Phase 1 item means the subsystem vocabulary, dependency direction, state categories, design package, and runtime implementation foothold are in place.
|
||||
- It does not mean the whole app is fully extracted. Eventing, sole-owner render threading, live-state layering, background persistence, backend lifecycle, and richer telemetry continue through later phases.
|
||||
- The checked Phase 2 item means the internal event model substrate is complete enough for later phases: the typed event vocabulary, app-owned dispatcher, coalesced event pump, reload bridge events, production bridges, and pure event tests are in place. Remaining items in [PHASE_2_INTERNAL_EVENT_MODEL_DESIGN.md](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/docs/PHASE_2_INTERNAL_EVENT_MODEL_DESIGN.md) are narrow follow-ups, mainly completion/failure observations and later replacement of the runtime-store poll fallback with real file-watch events.
|
||||
- It does not mean the whole app is fully extracted. Sole-owner render threading, live-state layering, background persistence, backend lifecycle, and richer telemetry continue through later phases.
|
||||
|
||||
## Timing Review
|
||||
|
||||
@@ -26,7 +27,7 @@ The recent OSC work removed several control-path stalls, but the app still has a
|
||||
- output buffering and preroll are now larger, but the buffering model is still static and only loosely related to actual render cost
|
||||
- GPU readback is partly asynchronous, but the fallback path still returns to synchronous readback on any miss
|
||||
- preview presentation is still tied to the playout render path
|
||||
- background service timing still relies on coarse polling sleeps
|
||||
- background service timing is partially event-driven; runtime-store scanning still uses a bounded compatibility poll fallback
|
||||
|
||||
Those points are important because they affect not just average performance, but how the app behaves under brief spikes, device jitter, or load bursts.
|
||||
|
||||
@@ -337,19 +338,19 @@ Recommended direction:
|
||||
- consider deeper readback buffering or a true stale-frame reuse policy instead of immediate synchronous fallback
|
||||
- separate "freshest possible frame" policy from "never miss output deadline" policy and make that tradeoff explicit
|
||||
|
||||
### 8c. Background control and file-watch timing are still coarse
|
||||
### 8c. Background control and file-watch timing are partially event-driven
|
||||
|
||||
`RuntimeServices::PollLoop()` currently uses a `25 x Sleep(10)` loop, which gives it a coarse `~250 ms` cadence for file-watch polling and deferred OSC commit work.
|
||||
`ControlServices::PollLoop()` now uses a condition-variable wakeup for queued OSC commit work and a fallback timer for compatibility polling. That removes the old fixed `25 x Sleep(10)` cadence as the default OSC commit timing model, but file-watch/runtime-store refresh work still relies on a compatibility poll path.
|
||||
|
||||
Relevant code:
|
||||
|
||||
- [RuntimeServices.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServices.cpp:245)
|
||||
- [ControlServices.cpp](/c:/Users/Aiden/Documents/GitHub/video-shader-toys/apps/LoopThroughWithOpenGLCompositing/control/ControlServices.cpp:217)
|
||||
|
||||
That is acceptable for non-critical background work, but it is still too blunt to be the long-term timing model for coordination-heavy runtime services.
|
||||
That is acceptable as transitional non-critical background work. The Phase 2 bridge now publishes typed reload/file-change events when changes are detected; a later file-watch implementation can replace scanning as the source.
|
||||
|
||||
Recommended direction:
|
||||
|
||||
- replace coarse sleep polling with waitable events or condition-variable driven wakeups where practical
|
||||
- replace runtime-store scanning with true file-watch events when practical
|
||||
- isolate truly background work from latency-sensitive control reconciliation
|
||||
- add separate metrics for queue age, not just queue depth
|
||||
|
||||
|
||||
Reference in New Issue
Block a user