Skip to content

Rerun the launch scatter benchmark and refresh every published number - #332

Merged
Alek99 merged 2 commits into
mainfrom
alek/rerun-launch-benchmark
Jul 27, 2026
Merged

Rerun the launch scatter benchmark and refresh every published number#332
Alek99 merged 2 commits into
mainfrom
alek/rerun-launch-benchmark

Conversation

@Alek99

@Alek99 Alek99 commented Jul 27, 2026

Copy link
Copy Markdown
Member

What

The README, docs landing page, and public benchmarks page all quoted the 0.1.0 launch baseline recorded on 2026-07-13. This reruns that benchmark on current main (7604775) and moves every published figure onto the new measurement.

Why this is a controlled A/B, not just a fresh run

The rerun uses the 0.1.0 baseline's own uv project with --frozen, whose editable xy source resolves to the worktree it runs from. So Plotly 6.9.0, Kaleido 1.3.0, Matplotlib 3.11.0, NumPy 2.5.1 and Python 3.14.5 are identical across both runs on the same M5 Pro — the only intended variables are the xy revision and a Chrome patch bump (150.0.7871.115.186).

Across the 24 successful competitor timing cells, median absolute drift against 0.1.0 is 3.2%; 16 of 24 within 5%, all 24 within 10%. The largest deviations sit on the rows dominated by cold browser startup. That's the evidence the machine didn't move, which is what makes the xy-side delta below meaningful.

Results at 10M

900×420 contract XY was (0.1.0) Matplotlib Plotly
Static CPU PNG 0.0184 s 0.0232 s 2.7432 s 9.6433 s
Interactive first render, default GPU 0.1875 s 0.1797 s 2.9842 s 3.3729 s
Interactive first render, CPU fallback 1.0352 s 0.9920 s 3.6121 s 8.0888 s

Static render time improved 1.26–2.37×, most at 10k–1M where fixed per-call overhead dominates rather than kernel work. Interactive TTFR is unchanged within noise because it is bounded by cold browser startup, not by xy. At 1B only xy completes — 1.129 s static, 1.242 s interactive — and Plotly's static row now fails as a Kaleido timeout at 122 s / 26.09 GiB rather than at the 36 GiB ceiling.

Baseline handling

The 0.1.0 baseline stays committed and unchanged, as the runbook requires. The refresh lands in a sibling directory benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/ with raw JSON for both suites, environment, manifest, the copied lock, and a report that carries an explicit 0.1.0-versus-now comparison table.

Both suites, all sizes, three cold runs per successful cell, 180 s and 36 GiB guardrails, hardware-WebGL and SwiftShader rows kept separate. Renderer strings are recorded per sample, so the GPU and SwiftShader tables are verified rather than assumed from flags.

The environment was warmed before measuring: a first invocation in a fresh worktree reads 13× the warm value for the xy 10k static row (cold bytecode, Matplotlib's font cache, Kaleido's browser fetch). The runbook now says so.

Docs touched

README.md, docs/index.md, docs/overview/benchmarks.md, docs/app/xy_docs/demos/benchmark_charts.py (the three live charts on the benchmarks page), benchmarks/README.md, spec/benchmarks/methodology.md, and both byte-identical copies of launch-benchmark-comparison.svg.

Two caveats surfaced by the new data: the CPU-fallback 10M mean now sits slightly below the 1M mean, and static 1M sits below 100k — both flat within noise, so the docs' existing "small reversals" caveat was moved to point at the static path where it now applies.

Verification

  • Docs tests: 92 passed, 1 xfailed
  • ruff check / ruff format --check / codespell clean at repo root and in docs/app; pre-commit run --all-files passed
  • All three live docs charts compile and were rendered via to_png() and visually checked; the regenerated SVG was screenshotted and checked — its diff is only bar widths and value labels, layout untouched
  • A checker re-derived all 13 published figure groups from the committed raw JSON and compared them against the docs tables, the demo module constants, and the SVG labels: all match

Only the launch-scatter suite was rerun, since that is what the README and benchmark docs quote. The other harnesses (bench_vs, bench_interaction, bench_dashboard, bench_transport, CodSpeed) feed spec/benchmarks/results.md and CI and are untouched.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated published benchmark timings, memory usage figures, and performance comparisons.
    • Added refreshed launch baseline results and environment details for the latest benchmark rerun.
    • Updated benchmark reproduction instructions, including guidance to warm the environment before measuring.
    • Refreshed benchmark charts, evidence links, and methodology references.

The README, docs landing page, and public benchmarks page all quoted the
0.1.0 launch baseline recorded on 2026-07-13. This reruns that benchmark on
current main and moves every published figure onto the new measurement.

The rerun is a controlled A/B rather than a fresh unrelated run: it uses the
0.1.0 baseline's own uv project with --frozen, whose editable xy source
resolves to the worktree it runs from. Plotly 6.9.0, Kaleido 1.3.0,
Matplotlib 3.11.0, NumPy 2.5.1 and Python 3.14.5 are therefore identical
across both runs on the same M5 Pro, leaving the xy revision and a Chrome
patch bump as the only intended variables. Across the 24 successful
competitor timing cells the median absolute drift against 0.1.0 is 3.2%,
16 of 24 land within 5% and all 24 within 10%, with the largest deviations
on the rows dominated by cold browser startup.

Static render time improved 1.26-2.37x, most at 10k-1M where fixed per-call
overhead dominates rather than kernel work; at 10M the static CPU PNG is
0.0184 s against 0.0232 s. Interactive TTFR is unchanged within noise
because it is bounded by cold browser startup, not by xy. At 1B only xy
completes, in 1.129 s static and 1.242 s interactive; Plotly's static row
now fails as a Kaleido timeout at 122 s rather than at the memory ceiling.

The 0.1.0 baseline stays committed and unchanged as the runbook requires;
the refresh lands in a sibling directory and its report carries an explicit
0.1.0-versus-now comparison. Both suites, all sizes, three cold runs per
cell, 180 s and 36 GiB guardrails, hardware-WebGL and SwiftShader rows kept
separate. The environment was warmed first: a first invocation in a fresh
worktree reads 13x the warm value for the xy 10k static row, and the
runbook now says so.

Every published figure was re-derived from the committed raw JSON and
checked against the docs tables, the live docs charts, and the comparison
SVG before commit.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Alek99, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 31 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ac9d9eee-58fd-4d78-b27a-3ddde5df4258

📥 Commits

Reviewing files that changed from the base of the PR and between 19874b7 and a55fda4.

📒 Files selected for processing (2)
  • benchmarks/README.md
  • docs/overview/benchmarks.md
📝 Walkthrough

Walkthrough

The PR adds a 2026-07-26 macOS ARM64 launch benchmark baseline, including raw results, environment metadata, configuration, and report data. It updates benchmark documentation, README claims, methodology references, and embedded chart values to reflect the refreshed measurements.

Changes

Launch benchmark refresh

Layer / File(s) Summary
Baseline definition and environment
benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/{environment.json,manifest.json,pyproject.toml}, report.md
Defines the rerun environment, pinned project setup, benchmark configuration, and rendering contracts.
Benchmark results and report
benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/{default-results.json,cpu-fallback-results.json,report.md}
Records static, interactive, and CPU-fallback samples, aggregates, memory-limit outcomes, methodology, conclusions, limitations, and reproduction commands.
Published benchmark documentation
README.md, benchmarks/README.md, docs/index.md, docs/overview/benchmarks.md, spec/benchmarks/methodology.md
Updates published benchmark figures, baseline links, evidence paths, runbook instructions, and baseline disclosure guidance.
Benchmark chart snapshots
docs/app/xy_docs/demos/benchmark_charts.py
Updates embedded timing and memory datasets and their chart annotations.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

  • reflex-dev/xy#297: Updates and restructures the README Benchmarks content and related baseline/runbook links.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the benchmark rerun and the refresh of published figures across the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alek/rerun-launch-benchmark

Comment @coderabbitai help to get the list of available commands.

@codspeed-hq

codspeed-hq Bot commented Jul 27, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 103 untouched benchmarks
⏩ 2 skipped benchmarks1


Comparing alek/rerun-launch-benchmark (a55fda4) with main (7604775)

Open in CodSpeed

Footnotes

  1. 2 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (2)
benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/report.md (1)

7-9: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Record the RNG seed in the machine-readable baseline too.

The report states seed 20260713 (Line 253) but neither manifest.json nor environment.json carries it, so a re-run reproducing this baseline has to parse prose to get the one input that determines the data. Consider adding "seed": 20260713 to manifest.json.

As per coding guidelines, "Record every decimation and tier decision in the specification; decisions must never be silent."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/report.md`
around lines 7 - 9, Update the machine-readable benchmark metadata, preferably
manifest.json, to include the RNG seed as a numeric "seed" field with value
20260713. Keep the existing report and benchmark configuration unchanged while
ensuring reruns can obtain the seed without parsing report prose.

Source: Coding guidelines

docs/overview/benchmarks.md (1)

148-148: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

markdownlint MD048: fence style.

This file's configured code-fence style is tilde; the reproduction block opens with backticks. Switch to ~~~bash / ~~~ to keep docs lint green.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/overview/benchmarks.md` at line 148, Update the reproduction code block
in the benchmarks documentation from backtick fences to tilde fences, using the
configured ~~~bash opener and matching ~~~ closer so markdownlint MD048 passes.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/default-results.json`:
- Around line 840-848: Redact absolute home-directory prefixes in the plotly
entry’s stderr_tail before publishing the benchmark artifact, replacing
`/Users/alek` and equivalent local home paths with a non-sensitive placeholder
while preserving the traceback and error details.

In `@benchmarks/README.md`:
- Around line 75-78: Update the benchmark warm-up guidance in
benchmarks/README.md to remove the unsupported “13× the warm value” claim and
any derived cold-run figure, unless a corresponding cold measurement is added to
the committed baseline artifact. Preserve the qualitative instruction to discard
the first invocation because it includes cold-cache, font-cache, and
browser-download costs.

In `@docs/overview/benchmarks.md`:
- Around line 139-143: Add a link to cpu-fallback-results.json in the benchmark
evidence list near the existing Raw default-path results link, using the same
baseline directory and a clear label indicating CPU-fallback raw results.

---

Nitpick comments:
In `@benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/report.md`:
- Around line 7-9: Update the machine-readable benchmark metadata, preferably
manifest.json, to include the RNG seed as a numeric "seed" field with value
20260713. Keep the existing report and benchmark configuration unchanged while
ensuring reruns can obtain the seed without parsing report prose.

In `@docs/overview/benchmarks.md`:
- Line 148: Update the reproduction code block in the benchmarks documentation
from backtick fences to tilde fences, using the configured ~~~bash opener and
matching ~~~ closer so markdownlint MD048 passes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a2292136-cbc4-4cef-bbf1-4e375e68db22

📥 Commits

Reviewing files that changed from the base of the PR and between 7604775 and 19874b7.

⛔ Files ignored due to path filters (3)
  • benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/uv.lock is excluded by !**/*.lock
  • docs/app/assets/launch-benchmark-comparison.svg is excluded by !**/*.svg
  • spec/assets/launch-benchmark-comparison.svg is excluded by !**/*.svg
📒 Files selected for processing (12)
  • README.md
  • benchmarks/README.md
  • benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/cpu-fallback-results.json
  • benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/default-results.json
  • benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/environment.json
  • benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/manifest.json
  • benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/pyproject.toml
  • benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/report.md
  • docs/app/xy_docs/demos/benchmark_charts.py
  • docs/index.md
  • docs/overview/benchmarks.md
  • spec/benchmarks/methodology.md

Comment on lines +840 to +848
{
"status": "failed(exit=1)",
"library": "plotly",
"n": 1000000000,
"peak_rss_bytes": 28016345088,
"wall_ms": 122100.63737502787,
"stdout_tail": "",
"stderr_tail": "lib/python3.14/asyncio/runners.py\", line 127, in run\n return self._loop.run_until_complete(task)\n ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^\n File \"/Users/alek/.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/asyncio/base_events.py\", line 719, in run_until_complete\n return future.result()\n ~~~~~~~~~~~~~^^\n File \"/Users/alek/Desktop/xy-bench/benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/.venv/lib/python3.14/site-packages/kaleido/__init__.py\", line 104, in calc_fig\n return await k.calc_fig(\n ^^^^^^^^^^^^^^^^^\n ...<3 lines>...\n )\n ^\n File \"/Users/alek/Desktop/xy-bench/benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/.venv/lib/python3.14/site-packages/kaleido/kaleido.py\", line 618, in calc_fig\n return await self.write_fig_from_object( # type: ignore[reportCallIssue]\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n ...<4 lines>...\n )\n ^\n File \"/Users/alek/Desktop/xy-bench/benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/.venv/lib/python3.14/site-packages/kaleido/kaleido.py\", line 493, in write_fig_from_object\n res = await asyncio.gather(*tasks, return_exceptions=not cancel_on_error)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File \"/Users/alek/Desktop/xy-bench/benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/.venv/lib/python3.14/site-packages/kaleido/kaleido.py\", line 358, in _render_task\n img_bytes = await asyncio.wait_for(\n ^^^^^^^^^^^^^^^^^^^^^^^\n ...<7 lines>...\n )\n ^\n File \"/Users/alek/.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/asyncio/tasks.py\", line 487, in wait_for\n async with timeouts.timeout(timeout):\n ~~~~~~~~~~~~~~~~^^^^^^^^^\n File \"/Users/alek/.local/share/uv/python/cpython-3.14.5-macos-aarch64-none/lib/python3.14/asyncio/timeouts.py\", line 114, in __aexit__\n raise TimeoutError from exc_val\nTimeoutError\n"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

printf '\n== relevant files ==\n'
git ls-files 'benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/default-results.json' \
             'benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/manifest.json' \
             'benchmarks/launch_baselines/xy-main-2026-07-26/report.md' \
             'benchmarks/README.md' \
             'benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/default-results.json' \
             'benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/manifest.json' \
             'benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/*' \
             'benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/*'

printf '\n== manifest/report references ==\n'
rg -n --no-heading 'reproduction\.uv_project|xy-main-2026-07-26|xy-0\.1\.0|launch_baselines|venv|Desktop/xy-bench' \
  benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/manifest.json \
  benchmarks/launch_baselines/xy-main-2026-07-26/report.md \
  benchmarks/README.md \
  benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/manifest.json \
  benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/default-results.json || true

printf '\n== surrounding excerpt from the reviewed file ==\n'
python3 - <<'PY'
from pathlib import Path
p = Path('benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/default-results.json')
text = p.read_text()
needle = '"library": "plotly"'
idx = text.find(needle)
start = max(0, idx - 600)
end = min(len(text), idx + 1800)
print(text[start:end])
PY

printf '\n== compare with 0.1.0 result path patterns ==\n'
python3 - <<'PY'
from pathlib import Path
for rel in [
    'benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/default-results.json',
    'benchmarks/launch_baselines/xy-0.1.0/macos-arm64-m5-pro/default-results.json',
]:
    p = Path(rel)
    if p.exists():
        s = p.read_text()
        import re
        paths = sorted(set(re.findall(r'/Users/[^"]+', s)))
        print(rel)
        for path in paths[:8]:
            print('  ', path)
        if len(paths) > 8:
            print('  ...', len(paths), 'total')
PY

Repository: reflex-dev/xy

Length of output: 10141


Redact home-directory paths from stderr_tail
The published JSON leaks /Users/alek/... paths and the local username in stderr_tail; scrub absolute home-directory prefixes before committing this artifact.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@benchmarks/launch_baselines/xy-main-2026-07-26/macos-arm64-m5-pro/default-results.json`
around lines 840 - 848, Redact absolute home-directory prefixes in the plotly
entry’s stderr_tail before publishing the benchmark artifact, replacing
`/Users/alek` and equivalent local home paths with a non-sensitive placeholder
while preserving the traceback and error details.

Comment thread benchmarks/README.md Outdated
Comment thread docs/overview/benchmarks.md
…lback artifact

Two review fixes.

The runbook quoted a "13x the warm value" cold-start multiplier that no
committed artifact backs; discarded warm-up runs are deliberately not part
of the baseline, and spec/benchmarks/methodology.md bans numbers in prose
that don't exist in the artifact. The instruction to run once and discard
stands on its own without the figure.

The public benchmarks page publishes an interactive CPU-fallback row but
only linked the default-path results. cpu-fallback-results.json is the only
artifact backing that row and is committed in the same directory, so link it.
@Alek99
Alek99 merged commit e4b119b into main Jul 27, 2026
28 checks passed
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