Skip to content

feat(bench): open cell-renderer scripts to comparator adapters (B2 follow-up #5a)#130

Merged
blove merged 1 commit into
mainfrom
b2-followup-5a-cell-renderer-comparators
May 10, 2026
Merged

feat(bench): open cell-renderer scripts to comparator adapters (B2 follow-up #5a)#130
blove merged 1 commit into
mainfrom
b2-followup-5a-cell-renderer-comparators

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented May 10, 2026

Summary

First slice of B2 follow-up #5. Opens the `scroll-with-format` / `scroll-with-render` / `scroll-with-heavy-render` gate in `validateSupportedP0aRequest` so the AG Grid + TanStack + MUI adapters can run them. The Phase 1–3 adapters already had the scriptName-driven render branches wired; only the gate was holding the runs back.

Selection scripts (`select-range-extend` / `keyboard-nav-row` / `select-all`) stay pretable-only because range-select + select-all are paid-tier in AG Grid Enterprise + MUI X Pro and TanStack Table doesn't ship native cell selection.

What changed

  • `packages/bench-runner/src/index.ts` — split the gate that previously kept both selection and cell-renderer scripts pretable-only. Cell-renderer scripts now run on all four adapters (S2-only). Selection scripts unchanged.
  • `packages/bench-runner/src/tests/bench-runner.test.ts` — positive assertions that all four adapters can run cell-renderer scripts on S2; regression guard that selection scripts stay pretable-only.
  • `apps/bench/src/bench-app.tsx` — cell-renderer scripts now get the same extra mount-frame `waitForNextAnimationFrame()` that the regular `scroll` script already had. Without it, AG Grid hit "scroll viewport unavailable" on a fresh mount because its body viewport attaches one frame after the outer adapter section becomes visible.
  • `status/milestones/2026-05-10-b2-cell-renderer-comparators.hypotheses.json` — new milestone from the matrix re-run.

Comparator evidence

n=3 medians, blank-gap counts in parens:

Script pretable ag-grid tanstack mui
`scroll-with-format` 10.2 ms (0) 25.1 ms (1) 17.5 ms (1) 10.2 ms (0)
`scroll-with-render` 16.4 ms (0) 24.9 ms (1) 17.0 ms (1) 10.3 ms (0)
`scroll-with-heavy-render` 10.3 ms (0) 25.2 ms (1) 23.4 ms (1) 10.1 ms (0)

Strongest comparative wedge surfaced since the original B2 H1 stub-baseline era: pretable beats AG Grid Community 2–2.5× on every cell-renderer script with zero blank gaps; AG Grid drops a blank gap on each.

Pretable matches MUI on format + heavy-render but loses on `scroll-with-render` (16.4 vs 10.3 ms). Heavy-render is cheap-render plus extra DOM, yet faster — same dataset, fewer DOM nodes, more frame budget consumed in the cheap path. Suggests a perf cliff in pretable's cheap-React-cellRenderer code path. Logged as a follow-up to investigate (not addressed here).

Hypothesis status

H# Status Notes
H1 satisfied Same parity story as B2 corrections (n=3 sample lands pretable just under MUI).
H19 satisfied Format overhead is −0.10 ms (format 10.2 ms vs scroll baseline 10.3 ms).
H20 satisfied Cheap-render p95 = 10.2 ms ≤ 16 ms single-frame budget.
H21 satisfied Heavy-render p95 = 10.3 ms ≤ 20 ms.

H19/H20/H21 evaluators are pretable-only at the evaluator level — they don't surface comparator evidence inline even now that comparators have run. The data lives in the per-run `status/chromium--default-s2-hypothesis-scroll-with-*.summary.json` files. Extending the evaluators is future work; for now the milestone is the source of truth.

What's NOT in this PR

  • Sort / filter-text / filter-metadata gate opening (option C from the brainstorm). Sequenced next per the user's "A then C" choice.
  • Comparator-aware H19/H20/H21 evaluators (data captured per-run; evaluator surface is future work).
  • Pretable `scroll-with-render` perf-cliff investigation (logged in repo-memory).

Test plan

  • `pnpm -w typecheck` passes
  • `pnpm -w test` passes (190 website tests, 5/5 bench-runner — gate-split assertions added, all green)
  • `pnpm -w lint` 0 errors
  • `pnpm format` clean
  • Matrix run successful end-to-end after the bench-app mount-frame fix

🤖 Generated with Claude Code

B2 follow-up #5a (first slice of follow-up #5). The supportedScripts
gate in packages/bench-runner/src/index.ts kept scroll-with-format /
scroll-with-render / scroll-with-heavy-render pretable-only, even
though the AG Grid + TanStack + MUI adapters had wired the
scriptName-driven render branches in Phase 1-3 of B2.

Changes:

- `packages/bench-runner/src/index.ts`: split the gate. Cell-renderer
  scripts now run on all four adapters (S2-only); selection scripts
  (select-range-extend / keyboard-nav-row / select-all) remain
  pretable-only because range-select + select-all are paid-tier in
  AG Grid Enterprise + MUI X Pro and TanStack ships no native cell
  selection.
- `packages/bench-runner/src/__tests__/bench-runner.test.ts`: positive
  assertions that all four adapters can run cell-renderer scripts on
  S2; regression guard that selection scripts stay pretable-only.
- `apps/bench/src/bench-app.tsx`: cell-renderer scripts now get the
  same extra mount-frame wait that scroll already had — without it,
  AG Grid hit "scroll viewport unavailable" because its body viewport
  attaches one frame after the section becomes visible.

Matrix re-run committed under
status/milestones/2026-05-10-b2-cell-renderer-comparators.hypotheses.json
(4 adapters × 4 scripts × 3 repeats; ~2 min wall-clock). H1 + H19 +
H20 + H21 all satisfied.

Findings (n=3 medians, blank-gap counts in parens):

| Script | pretable | ag-grid | tanstack | mui |
| --- | --- | --- | --- | --- |
| scroll-with-format | 10.2ms (0) | 25.1ms (1) | 17.5ms (1) | 10.2ms (0) |
| scroll-with-render | 16.4ms (0) | 24.9ms (1) | 17.0ms (1) | 10.3ms (0) |
| scroll-with-heavy-render | 10.3ms (0) | 25.2ms (1) | 23.4ms (1) | 10.1ms (0) |

Pretable beats AG Grid 2-2.5× on every cell-renderer script with zero
blank gaps. Pretable matches MUI on format and heavy-render but loses
on scroll-with-render — anomaly logged for follow-up investigation
(pretable's cheap-React-cellRenderer path has a perf cliff that the
heavier path avoids).

H19/H20/H21 evaluators are pretable-only at the evaluator level; the
comparator data lives in per-run summary files. Future work could
extend the evaluators to surface comparator evidence inline.

Sort/filter gate (option C from the brainstorm) is the remaining slice
of follow-up #5, sequenced after this PR per "A then C".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@blove blove enabled auto-merge (squash) May 10, 2026 16:41
@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2026

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

Project Deployment Actions Updated (UTC)
pretable Ready Ready Preview, Comment May 10, 2026 4:42pm

@blove blove merged commit a074857 into main May 10, 2026
11 checks passed
@blove blove deleted the b2-followup-5a-cell-renderer-comparators branch May 10, 2026 16:44
@github-actions
Copy link
Copy Markdown
Contributor

Vercel preview ready

Preview: https://pretable-qolzmijds-cacheplane.vercel.app
Commit: b91d55868703807c39c9d89b7c20e127729ce266

Updated automatically by the deploy-preview job.

blove added a commit that referenced this pull request May 11, 2026
…rdict) (#133)

* docs(specs): pretable scroll-with-render perf diagnostic design

Three-phase research PR mirroring PR #124's pattern: high-repeat (n=20)
re-run, conditional Playwright trace capture, research memo. Diagnoses
whether the PR #130 cheap-render anomaly (16.4 ms vs 10.3 ms for format
and heavy-render) is real or a low-sample artifact.

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

* docs(plans): pretable scroll-with-render perf diagnostic plan

Seven-task plan mirroring PR #124's three-phase pattern: n=20 matrix
re-run, conditional Playwright trace capture, research memo.

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

* docs(research): pretable scroll-with-render perf diagnostic memo

Verdict: noise. The PR #130 cheap-render anomaly (16.4 ms vs ~10.3 ms
for format and heavy-render at n=3) was a sampling artifact. At higher
repeats, scroll-with-render is at parity with (in fact marginally
faster than) the other two:

| Script                     |   n | mean (ms) |   σ (ms) |
| -------------------------- | --: | --------: | -------: |
| scroll-with-format         |   8 |      9.36 |     0.80 |
| scroll-with-render         |   7 |      8.97 |     0.35 |
| scroll-with-heavy-render   |   6 |      9.15 |     0.13 |

Both 2σ pairs (cheap-vs-format, cheap-vs-heavy) are well within the
noise floor. Same shape as PR #124's finding at larger magnitude.

The matrix run completed only ~36% of planned repeats (Playwright
flake; not investigated) but the observed σ values make the verdict
unambiguous — PR #130's 6 ms gap is ~21σ away from the observed
distribution. No perf-fix PR needed.

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

* chore: prettier-format perf-diag artifacts

---------

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