Skip to content

docs(research): pretable wrapped-text filter perf diagnostic#142

Merged
blove merged 7 commits into
mainfrom
wrapped-text-filter-perf-diag
May 13, 2026
Merged

docs(research): pretable wrapped-text filter perf diagnostic#142
blove merged 7 commits into
mainfrom
wrapped-text-filter-perf-diag

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 13, 2026

Summary

  • Captures a Playwright run + adds a research memo identifying the likely cost driver behind pretable's three over-budget interaction scripts (sort / filter-metadata / filter-text reliably 1-2 ms over the 16 ms single-frame budget per PR docs(research): interaction borderline perf diagnostic (real over-budget on pretable filter-text) #134).
  • Trace-based flame-graph analysis is BLOCKED: the existing bench harness writes a Playwright SDK action trace (API events + snapshots only), not a Chrome DevTools performance recording. A function-level breakdown of the trigger-to-first-frame window is not extractable without an interactive browser or a CDP-tracing wrapper.
  • Memo falls back to a code-reading hypothesis: createDomRenderSnapshot calls estimateRowHeight over every row in snapshot.visibleRows (~500 rows post filter-text), and post-filter most of those rows are not in the WeakMap layout cache — driving ~500 wrap-aware prepareText + layoutPreparedText passes per interaction.
  • Verdict: memo-only. Phase D not fired (gate feat: add S7 pinned-inspection scenario with H9-H12 hypotheses #1 "one obvious code change" fails because the hypothesis needs measured confirmation before any production change). Four proposed fixes laid out (lazy rowHeights, mount-time cache warm, identity-keyed memo, useDeferredValue).

What's in this PR

  • status/traces/2026-05-13-pretable-filter-text-perf.trace.zip — captured single-sample trace artifact (force-added past .gitignore's status/traces/*.zip rule since the memo references it).
  • docs/research/2026-05-13-pretable-wrapped-text-filter-perf-diagnostic.md — the memo.
  • Prettier-format cleanup on the (pre-existing) plan + spec.

What's NOT in this PR

  • No production code change. No scripts/bench-matrix.mjs threshold change. No public-API change.
  • No re-confirmation matrix run (Phase D skipped).
  • No follow-up to retool the bench harness for CDP performance tracing — logged as the natural next step in the memo's "Trace breakdown" section.

Test plan

  • pnpm -w typecheck clean
  • pnpm -w test clean (191 website tests + all package tests pass)
  • pnpm -w lint clean
  • pnpm format clean

🤖 Generated with Claude Code

blove and others added 5 commits May 13, 2026 10:25
Three-phase pattern (trace + analyze + memo) with conditional fix in
same PR. Mirrors PR #124 / PR #133 with a Phase D escape hatch for
single-cause low-risk fixes. Targets pretable's interaction scripts
landing 1-2 ms over the 16 ms single-frame budget on Chromium
S2/hypothesis (PR #134 finding).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Five-task plan: trace capture, manual analysis, memo, conditional fix,
gates + PR. Auto-merge if memo-only; hold if a fix ships.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
pretable Ready Ready Preview, Comment May 13, 2026 5:37pm

@blove blove enabled auto-merge (squash) May 13, 2026 17:34
blove and others added 2 commits May 13, 2026 10:35
…itted traces

The trace was captured locally per the spec but force-added past
.gitignore — the project's standing pattern is `status/traces/*.zip` is
gitignored. Removing the binary; memo updated to note the trace is
local-only and that Playwright's default action-trace format doesn't
capture per-function timeline data anyway (the real blocker for this
investigation, separately documented in the memo's "bench-harness gap"
follow-up).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The trace path reference in the memo was pointing at a binary that
was force-added past .gitignore and then removed in the prior commit.
Update the reference to note the trace is local-only and the Playwright
action-trace format wouldn't have given flame-graph data anyway.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@blove blove merged commit c5f8edd into main May 13, 2026
11 checks passed
@blove blove deleted the wrapped-text-filter-perf-diag branch May 13, 2026 17:39
@github-actions
Copy link
Copy Markdown
Contributor

Vercel preview ready

Preview: https://pretable-51qu1l8fn-cacheplane.vercel.app
Commit: 2d819822a5983492dd7a5f54d96498e94bcc8c26

Updated automatically by the deploy-preview job.

blove added a commit that referenced this pull request May 13, 2026
…h perf diagnostics) (#143)

* docs(specs): bench-harness CDP tracing design

Opt-in CDP-level tracing path for apps/bench/tests/bench.spec.ts.
Unblocks future perf diagnostics that need flame-graph data (the
wrapped-text filter investigation from PR #142 hit this exact wall).
No matrix-runner integration; opt-in via PLAYWRIGHT_PERF_TRACE=1 env.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs(plans): bench-harness CDP tracing implementation plan

Four-task plan: wire CDP-tracing branch behind PLAYWRIGHT_PERF_TRACE=1
env opt-in, manual verification, repo-memory entry, gates + PR.
Auto-mergeable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* feat(bench): opt-in CDP tracing in bench.spec.ts via PLAYWRIGHT_PERF_TRACE

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* docs(research): repo-memory entry — bench-harness CDP tracing

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* chore: prettier format spec + plan

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant