Improve dashboard context telemetry and PNG export speed - #3
Merged
Conversation
webglcontextlost dispatches as a task, so evictions triggered by the creation loop only fire on the next yield. The probe flipped phase to "initial" before yielding, so every creation eviction was mislabeled "initial" and the "create" phase could never appear in real reports. Yield first, then advance the phase; guard the ordering in the telemetry marker test. Also add the missing Unreleased changelog entries for the dashboard telemetry rework and the PNG compression-level change.
Alek99
marked this pull request as ready for review
July 9, 2026 20:46
FarhanAliRaza
added a commit
that referenced
this pull request
Jul 15, 2026
- Legend now (re)freezes options and swatch scaling via _attach() when added to an axes, so a legend constructed against one axes but attached to another picks up the host's dpi/rcParams (review #1). - Legend.__init__ warns on handles/labels length mismatch and on handles without a legend entry instead of dropping them silently (review #4). - JS tracks every legend box (not just the primary) so _resize refreshes max-height on extra legends too (review #2). - JS line swatch uses ?? so an explicit lw=0 draws nothing instead of falling back to 1.5px (review #3). - Drop unreachable return in _best_legend_loc (review #5).
FarhanAliRaza
added a commit
that referenced
this pull request
Jul 15, 2026
* Improve pyplot legend and dash parity * Fix extra legend rendering regressions * Address review: legend attach recompute, resize tracking, lw=0 swatch - Legend now (re)freezes options and swatch scaling via _attach() when added to an axes, so a legend constructed against one axes but attached to another picks up the host's dpi/rcParams (review #1). - Legend.__init__ warns on handles/labels length mismatch and on handles without a legend entry instead of dropping them silently (review #4). - JS tracks every legend box (not just the primary) so _resize refreshes max-height on extra legends too (review #2). - JS line swatch uses ?? so an explicit lw=0 draws nothing instead of falling back to 1.5px (review #3). - Drop unreachable return in _best_legend_loc (review #5). --------- Co-authored-by: Alek <alek@reflex.dev>
This was referenced Jul 22, 2026
Merged
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.
Summary
webglcontextlost/webglcontextrestoredevents, phases, initial/scrolled nonblank IDs, active chart count, and a stable loss-free ceilingWhy
Chrome accepts contexts beyond its per-page quota by evicting older contexts. The previous dashboard probe inferred the cap from blank pixels, threw on the first partial dashboard, and discarded the scaling metrics needed to design shared-context rendering. It also could not distinguish LRU eviction from allocation failure.
The interaction probe issued a warm draw without a readback, so its first timed wheel gesture could pay deferred shader/GPU work. Native PNG export also spent most of its time in level-9 deflate for a very small size win.
Measured impact
Validation
cargo build --release.venv/bin/python -m pytest -q(880 passed).venv/bin/ruff check ..venv/bin/ruff format --checkon all changed Python files.venv/bin/python scripts/verify_local.py --only benchmark_harnessverify_benchmark_report.py --kind dashboard-browserscripts/interaction_stress_smoke.pywith 12 repetitionsRepository-wide
ruff format --check .currently flags upstreamexamples/demo.ipynb, which this branch does not modify.