client: pull the next grid frame only after a frame was presented #415
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!415
Loading…
Reference in a new issue
No description provided.
Delete branch "client/pace-pulls-when-unpresentable"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A window that cannot present fails its surface acquire at once instead of waiting for vsync. On macOS, wgpu returns
Occludedfor a covered or minimized window or a locked screen, andTimeoutfor a sleeping display.on_redrawskipped the frame but still sentNextGridFrame, so the client pulled and decoded grid cycles as fast as the acquire failed. On an M4 Max under DOOM-fire that cost 0.2 to 0.7 of a core, and none of it reached the screen.Change
PullScheduler::after_frame(presented)).PresentRetry, felis-client-core). The first retry waits one refresh interval, and each further failure doubles the wait, up to 1 s.WindowEvent::Occluded(false)makes the retry due at once.docs/explanation/rendering/pipeline.md"Demand-driven emission", and a CHANGELOG "Fixed" entry.Measured
M4 Max, release builds, 10 s of DOOM-fire at 35x120, isolated HOME and daemon. Figures are client CPU seconds per run.
b5204672)A fixed refresh-interval retry, without the doubling, cost 0.17-0.27 s per idle 10 s. The daemon's CPU did not change. The screen was locked for every run, so none of them presented a frame. The resume path is covered by unit tests only.
Tests
The decision is tested in
crates/felis-client-core/src/pull.rs:The App-level wiring has no harness (#150).
just checkpasses.Closes #407