Repository navigation
docs(benchmarks): the benchmark charts and their method are one page of the docs, in the site's theme - #1860
Merged
Merged
Conversation
…of the docs, in the site's theme The standalone benchmarks-scaling.html is gone. about/benchmarks.md carries the charts, a section on reading them, and the method that was its own page. The chart code moves to docs/javascripts/benchmarks.js, loaded as a module on every page and drawing only where the page has a #benchmark-charts block, on each document$ emission so instant navigation redraws and clears it. The import map moves into an overrides/main.html head block. Colours take the theme's surface and text variables, so the block follows the site's light and dark toggle. The rows file is renamed benchmarks.json after its page. Prose, measured with the docs-writing script: 86 sentences, median 17 words, 18 over 25 (the old method page: 54, median 17, 11 over 25). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K42KwZJtqPPhf5hDzUD91o
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K42KwZJtqPPhf5hDzUD91o
Documentation build overview
4 files changed± about/index.html± about/benchmarks/index.html± about/changelog/index.html- about/benchmarks-scaling.html |
The click handler still matched the standalone page's `.seg` class, while the docs markup names its groups `bench-seg`, so no toggle reached it. The legend worked because it matches by id. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K42KwZJtqPPhf5hDzUD91o
Merging this PR will not alter performance
Comparing Footnotes
|
…ollow again The dots took their ring and fill from `--surface-1`, a token of the standalone page that the docs stylesheet does not define. Chromium then drew the measured dots without a ring and filled the projection rings black. They now use `--surface`, which follows the site theme. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K42KwZJtqPPhf5hDzUD91o
FBumann
enabled auto-merge (squash)
October 6, 2026 21:21
FBumann
added a commit
that referenced
this pull request
Oct 6, 2026
…pecsolve, and the specsolve label sits clear of the other lines (#1862) > **Prompt:** I woud like to quickly explore some minor improvements to the visal, hover and specsolve text positionon. > [!NOTE] > The following content was generated by AI. The specsolve label moves to the right of its last point, clear of the other lines. The tooltip lists the libraries slowest first, as the lines stack, with each value and its ratio to specsolve aligned in columns. pyomo takes the gold of its logo and linopy the blue. <details><summary>What changed</summary> - **Label.** The label sat above and left of specsolve's last point, where the lines bunch up, and overlapped them. It now sits right of that point, vertically centred, in a 76 px right margin. It is a chart control, not a text mark: the marks share one clip group, and the clip cut the label off in the margin. At a size where specsolve is projected, the label follows the end of the projection. - **Tooltip rows.** - The rows are sorted by value, slowest at the top and fastest at the bottom, the order of the lines at that size. They were in legend order. - Every row reads `library value · ratio`, specsolve's own `1.0×` included. specsolve's row is `active`, so TanStack draws it bold on a tinted background. - A projected row says so in its label, `pyomo (projected)`. The value no longer carries a `≈` prefix, which would break the column. - **Tooltip columns.** TanStack lays out each row as its own grid, with the value right-aligned in tabular digits. A column therefore lines up only if every entry has the same shape. Three rules give that: - one unit for the whole tooltip, the smallest value's (`14781 ms` over `761 ms`, not `14.78 s` over `761 ms`); - fixed decimals in each column: the ratio always has one, and the value has as many as its smallest entry needs; - left padding with figure spaces (U+2007), which are one digit wide. - **Tooltip size.** - TanStack's default font is 0.75rem, which is 15 px under the theme's 20 px root. The tooltip now uses .64rem, the table's size. - The width cap is 24rem rather than TanStack's 80% of the panel. - Labels do not wrap, so a long `(projected)` label near the panel edge stays on one line. - **Colours.** - **pyomo** takes the gold. Its logo is a bird, mostly gold and orange. - **linopy** takes the blue. Its logo is a grey-mauve wordmark with an orange dot, so it has no blue, but it has no other distinctive colour either. - **Orange for pyomo was tried and refused.** Beside gurobipy-loop's red, orange scores ΔE 11 for normal vision, below the validator's floor of 15. - **HiGHS** (red and black) appears only inside the neutral matrix floor, so it keeps no colour of its own. - **Dark-mode blue.** linopy is the line nearest specsolve, so in dark mode its blue moves from `#3987e5` to `#35b9f2`. That is drawn as `#329ccb` after the 85% mix with the surface. Against specsolve's violet, the blue drawn before (`#3372c0`) scored ΔE 14.3 for normal vision and 6.7 for protanopia. The new blue scores 16.2, and 6.4 for deuteranopia. The validator allows 6.4 only with a second cue; specsolve has three: a thicker line, larger dots and its label. In light mode the drawn pair scores 27, and 22 for deuteranopia. </details> <details><summary>What was verified, and what was not</summary> - **Gates:** `pixi run check` passed (4999 tests) on ee0c424. The later commits change only the changelog, the JS, the CSS and the page's JSON spec, which `check` does not lint. `pixi run docs-build` (strict) passes on the head commit. - **Browser, on the built site:** headless Chromium, with the jsdelivr files served from the npm tarball. - **Alignment, measured:** the sweep hovers every panel at 18 points each, for wall time and peak RSS on both ladders. That gives 204 tooltips. In every one, the non-bold value cells are the same width, a spread of 0.00 px. The bold specsolve cell is 0.8 px wider, because its digits are bold. No label wraps. - **Tooltip:** `dispatch — gurobi` at 1M reads: ``` pyomo 14781 ms · 18.2× gurobipy-loop 2420 ms · 3.0× linopy 941 ms · 1.2× specsolve 814 ms · 1.0× gurobipy-matrix 761 ms · 0.9× ``` Checked in light and dark. - **Colours:** read back from the page as drawn and checked with the dataviz skill's `validate_palette.js`. - **Label:** one `specsolve` label per panel, drawn in full right of the last point. Checked in log–log on the length ladder and in linear–linear on the width ladder. - **Toggles:** the toggle test from #1860 still passes, on a direct load and after instant navigation. - **Not checked:** phone widths. At phone width the 76 px margin leaves a plot of about 185 px. </details> <details><summary>What was not done</summary> - **Gridlines, the vertical hover line and dot sizes are unchanged.** I had proposed fainter gridlines, a lighter hover line, larger specsolve dots and a stronger dark-mode band. In the screenshots the gridlines already read as faint, and the specsolve dots are already the largest. The hover line stays as it is. - **The gold–red pair is left as it is.** As drawn, gold and red score ΔE 3.7 for deuteranopia in both themes, and 12.6 (light) and 14.7 (dark) for normal vision. This pair was there before this PR, when linopy had the gold; now pyomo has it. Both meet only in the Gurobi panels, where pyomo's line runs well above gurobipy-loop's. Fixing it means a new colour for one of them, so it is a separate change. </details> 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01K42KwZJtqPPhf5hDzUD91o --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
The following content was generated by AI.
The benchmark charts move from the standalone
benchmarks-scaling.htmlintoabout/benchmarks.md. That page now also holds the method, so there is one "Benchmarks" entry in the nav. The charts follow the site's light/dark toggle and work with instant navigation.How the charts live inside the docs
overrides/main.html(theme.custom_dir) adds the TanStack/d3 import map to the head of every page. It has to be every page because instant navigation never re-renders the head: a reader who reaches the benchmark page from another page keeps the first page's head. A map costs nothing until a module asks for it.docs/javascripts/benchmarks.jsis loaded throughextra_javascriptastype: module. On eachdocument$emission it destroys the previous page's charts. It then imports TanStack on demand, only when the page has a#benchmark-chartsblock, so no other page fetches the library. It stops if the reader has navigated away while the library loads.benchmarks.md.docs/stylesheets/benchmarks.csstakes surfaces and text from the theme's--md-*variables and switches the series and table colours under[data-md-color-scheme="slate"], so the block follows the site's toggle. The standalone page only followed the operating-system setting. The panels sit two to a row in the narrower content column.benchmarks-scaling.jsonis renamedbenchmarks.json, after its page.bench/plot.py, the published-benchmark workflow artifact list,docs/README.mdandbench/README.mdfollow.extra.css, the About index row and the two in-page links now point atabout/benchmarks/.bench/report.pydrops its link to the old chart page.Prose
What was verified, and what was not
pixi run checkpasses on 53ad43d (4999 passed).pixi run docs-build(strict),pixi run docs-test(112) andtests/test_docs_site.py+tests/test_doc_examples.py(140) pass. The bench harness tests pass (266)..segclass. My first browser test counted panels and rows, which stay the same across the scale and metric toggles, so it missed this. e9a71bb fixes it.--surface-1, a token that the docs stylesheet does not define. 53ad43d switches them to--surface.What was not done
about/benchmarks-scaling.htmlnow returns 404, under the no-compatibility rule.bench/README.mdlinks a#the-density-sweep-and-a-claim-it-refusesanchor that predates this PR and no longer exists. It is unchanged here.🤖 Generated with Claude Code
https://claude.ai/code/session_01K42KwZJtqPPhf5hDzUD91o