Repository navigation
perf: reduce child, workflow and long-session overhead - #895
Conversation
tt-a1i
left a comment
There was a problem hiding this comment.
Reviewed head 1061f966d3c0837a3d6904069af7bf411762b4d6 against ea4dfb993793ccdb093229588b6ccd3467afd90a. No blocking code findings.
Checked cancellation/restart waiter semantics; direct-child queued-event ordering and completed-only renderer eviction; workflow snapshot retention; session filtering before artifact hydration; graph lifecycle refreshes; checkpoint digest/file-identity validation and unconditional terminal publication; journal append invalidation; UTF-8/chunk/final-line catalog parsing and listener cleanup; footer fit reuse; and full-text preservation when large Markdown switches to source. Reviewed the associated regressions and generated bundle boundary.
Fresh local gates: bun run check passed; bun run test passed 2,368 Node tests (8 skips), plus 1,512 UI tests in 97 files. Existing exact-implementation production browser and real-provider evidence remains applicable; TUI visuals were confirmed by the user. Full transcript serialization and trust-sensitive resource discovery deliberately remain unchanged.
This is an author-side code review, not an independent approving review. Merge still depends on exact-head CI and the repository's approval requirements.
tt-a1i
left a comment
There was a problem hiding this comment.
Final review at 9f7f840392319730e59362a8cdbc6008e82148c9: no blocking code findings. The only follow-up since the previous review changes the existing Git process output test budget from 1 to 10 seconds, with an explanatory comment and research receipt. Windows had returned timeout code -1 before the expected exit code 7; the dedicated 20 ms timeout regression and production deadlines are unchanged.
Focused process tests pass all three cases. Fresh bun run check and complete bun run test pass again (2,368 Node tests, 8 skips; 1,512 UI tests / 97 files). Product implementation and the previously validated production bundle are unchanged. Awaiting CI on this exact head and the required independent approval; this author-side review does not replace that approval.
Problem
Long sessions and active workflows repeat work on progress updates, retain completed tool payloads beyond the bounded transcript, and rewrite unchanged checkpoint artifacts. Session catalog scans retain abort listeners and repeatedly search growing JSONL records; large Markdown previews create excessive DOM nodes. Related: #841 and the repeated-write portion of #839.
Value
Reduces avoidable CPU, allocation and disk work without changing Pi-owned execution history, authority or terminal evidence. Local diagnostics reduced ten preview-only checkpoints from 15,630,840 to 195,770 written bytes, and a 16 MiB JSONL record from 2.17 billion to 16.78 million newline-search characters. These are mechanism measurements, not application-wide latency guarantees.
Approach
Validation
bun run check: passed again before submission.bun run test: submission-time rerun passed 2,368 Node tests (8 skips) and 1,512 UI tests in 97 files.node scripts/web-performance.mjs: 11 production-bundle browser cases passed.9f7f840392319730e59362a8cdbc6008e82148c9found no blocking defects. All 18 checks passed on that exact head, including Linux/Windows, browser E2E and required aggregate checks. CI run: https://github.com/openpi-dev/openpi/actions/runs/39885170684. Windows CI exposed the existing output-test startup deadline described above; after repair, its focused local and remote checks passed. Raw private Session evidence remains outside Git.Impact
docs/research/PERFORMANCE_AUDIT_2026-10-23.md.