Skip to content

id: server-side redraw batching (few-ms frame coalescing) for all presentations #561

Closed

Description

@dezren39

What and why

Accumulate redraws for a few milliseconds and send one frame instead of a full view per committed event. Server-side only, it helps every tier and transport, and per the transport comparison it matters more than SSH vs QUIC. Per the transport comparison, render batching matters more for latency than SSH vs QUIC, and it helps every presentation at once.

Source

  • RPT §3 'Output path and batching'
  • RPT §5 'Buffered output while staying interactive'
  • RPT §13 (latency is mostly render batching)
  • RPT §14 Tier 2

RPT = doc/2026-10-18T18-40-00Z_report_platform_world_state/2026-10-18T18-40-00Z_report_platform_world_state.md, REF = doc/2026-10-18T00-00-00Z_reference_platform_state/2026-10-18T00-00-00Z_reference_platform_state.md. Both are uncommitted reports in the platform-world-apps-migration worktree.

Current status

Not started. Host events already coalesce through a tokio watch (RPT cites world.rs watch); committed events still trigger an immediate full view per session (RPT cites world_session.rs:2110-2115). grep -n 'batch\|coalesce\|debounce' pkgs/id/src/world_session.rs finds nothing.

Acceptance criteria

  • A short plan fixes the coalescing window and where it lives (session driver)
  • Committed events inside the window produce one frame per session, not one full view per event
  • SSH, web and CLI presentations all get it
  • Frame count and bytes are compared against the F11.9 baseline

Size

M

Prerequisites

Activity

  1. dezren39 commented on Oct 24, 2026

    @dezren39
    MemberAuthor

    id train triage (2026-10-24): too-big-needs-design — server-side redraw batching (D1-043), terminal-side counterpart of F12.11 and a prerequisite of F13.4.

  2. added
    kind/performancePerformance problem or optimization
    source/humanFiled directly by a human
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 26, 2026
  3. dezren39 commented on Oct 26, 2026

    @dezren39
    MemberAuthor

    Intake review

    Fleet-monitor intake pass (2026-10-26). Body already carries a full ## Acceptance criteria section, so this pass is label normalization plus a liveness check — no body edit.

    Verified live on main e3467560 (2026-10-26): git grep -c 'coalesce\|debounce' origin/main -- pkgs/id/src/world_session.rs finds nothing — committed events still trigger an immediate full view per session. Still live, exactly as filed.

    Related: prerequisite #542 (F11.9 bytes-per-frame baseline) is still open and unenriched, and the acceptance criteria's frame/byte comparison needs it. Terminal-side counterpart: #562. The plan-first acceptance bullet (fix the window and where it lives) is a design decision worth a short comment thread before code.

    Risks / notes: too long a window makes the world feel laggy; too short gains nothing. Interactive input echo should not be coalesced the same way as committed-event redraws — worth stating explicitly in the plan.

    Suggested approach: land the short plan first (window size, session-driver placement, echo exemption), then implement in the session driver so SSH, web, and CLI presentations all inherit it, and measure against the #542 baseline.

  4. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed on Nov 1, 2026
  5. 22 remaining items

  6. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Nov 1, 2026
  7. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    {"v":1,"kind":"parked","task":4832,"lane":"f","note":"PR #3905 OPEN for #561 (head 149880a, MERGEABLE/CLEAN after merging current main; sole conflict was Cargo.toml dev-deps, union-resolved). Codex round 1 on the implementation head: no findings; re-review requested for the merge head. Targeted paused-time test (coalesces) compiling/running on the laptop, log /tmp/4832-test.log. Parked 30m: resume = test pass + Codex clean on the new head, then merge PR #3905 and complete task 4832."}

  8. added
    queue/claimedQueue worker lifecycle state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 1, 2026
  9. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    {"v":1,"kind":"picked_up","task":4832,"lane":"openchamber-scheduled-lane","note":"Resumed queue task 4832. Fresh state: #561 OPEN; sole matching PR #3905 OPEN at head 149880a, latest Codex review clean, no hard-stop labels or competing implementation PR. Existing targeted test log currently shows compile failure in id-core tests (unresolved vt100); checking whether this reproduces on current main, which has advanced to bc76a7e since the PR merge head. Next: establish test status against clean main/current head and then merge if verified, otherwise park with exact resume condition."}

  10. added a commit that references this issue on Nov 1, 2026
  11. dezren39 commented on Nov 1, 2026

    @dezren39
    MemberAuthor

    agent-note:v1
    {"v":1,"kind":"done","task":4832,"lane":"openchamber-scheduled-lane","note":"Merged PR #3905 at 26bed62; GitHub closed #561. The targeted paused-time regression passed on the merged-main head (1 passed, 0 failed); rustfmt and diff checks passed. No required CI checks were configured; CodeRabbit skipped. Queue task completed; sandbox backlog/sweep bookkeeping deferred to fleet reconciliation."}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workenhancementNew feature or requestkind/performancePerformance problem or optimizationmeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/normalOrdinary priority (the default)source/humanFiled directly by a human

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions