Devlog ·
Foreground Timing Plan — April 13, 2026
~1 min read · 377 words
Current validated baseline:
fgpilot fishing1is visually correct.- Full-scene export is correct.
- Host timing preservation is corrected enough that playback is back near the earlier fast baseline instead of the over-slow scheduler-sum path.
- Launch path:
./scripts/rebuild-and-let-run.sh fgpilot fishing1
Validation rule:
- One change at a time.
- Clean rebuild and launch with the repo script.
- Human checks visuals and speed.
- If visuals are good and speed is same or better, commit and push.
What Worked
- Entry-table preload.
- Bulk-copy compositor fast path.
- Narrow background restore.
- Full-scene
story-single --until-exitexport. - Corrected host-timing preservation in the export pipeline.
- Single-tile upload-path tightening.
- Dedicated one-tile upload branch in
grDrawBackground(). - Same-bounds fused restore+composite path.
What Failed
- Direct framebuffer path.
- Diff/direct-delta runtime path.
- Progressive test path.
- Overlap-skip restore as implemented.
- Naive scheduler-delay summing.
- Naive read-ahead / double-buffering.
- Pilot-only black-clear restore replacement.
Prioritized Speed Backlog
-
grDrawBackground()/ upload cost. Best remaining likely win on the stable path. -
Safer background restore reduction. Retry only with stricter invariants than the broken overlap-skip version.
-
Pack-time precompute for runtime blits/restores. Tile coverage, row offsets, clipped spans.
-
Same-rect / same-shape cached setup. Reuse setup when consecutive frames share bounds.
-
Held-frame no-work path. If the frame is held, do the minimum possible.
-
More specialized memcpy-based foreground blit paths. Keep squeezing the stable compositor path.
-
Better CD read path, but not naive read-ahead. Any future buffering must preserve exact ownership and frame identity.
-
Pack layout improvements. Runtime-friendly ordering and alignment.
-
More timing work only after more render throughput wins. The biggest timing mistake is fixed for now.
-
Display mode experiments last. Do not revisit direct/progressive until the stable path is exhausted.
Next Target
Stay on the stable compositor path and keep attacking the heavy early-motion section of the scene, where the tall tree-walk rect still feels slower than the later action. Favor changes that reduce restore/upload work for larger active areas before returning to CD buffering experiments.
Repeat Prompt
Continue PS1 Fishing 1 foreground speed improvements from the current repo state. Stay on the stable
fgpilot fishing1path only. Make one high-impact safe improvement fromdocs/ps1/research/FOREGROUND_TIMING_PLAN_2026-04-13.md, launch it with./scripts/rebuild-and-let-run.sh fgpilot fishing1, and stop for my validation. Do not use experimental direct framebuffer, diff, or progressive paths unless explicitly asked.