Performance: line PNG export misses the 10× Matplotlib target (7.18× in release audit)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- data-visualization, performance, testing
Direzione di ricerca
Start with benchmarks/bench_pyplot_vs_matplotlib.py and spec/benchmarks/methodology.md; first reproduce the line result on a controlled runner using the standard-profile command in the issue, recording raw samples, environment, dimensions, and tier. Profile build, rasterization, and PNG encoding separately, then compare smoke, standard, and huge profiles and their output sizes. Done means meeting the 10× line target or revising the specification with reproducible evidence, while preserving image correctness, labels, dimensions, and tier disclosure.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The matched-output release benchmark found a line export gap against the existing per-family 10× Matplotlib/Agg goal in the benchmark methodology.
| Workload | XY total median | Matplotlib total median | Speedup | XY tier |
|---|---|---|---|---|
| 20,000 samples | 11.46 ms | 82.24 ms | 7.18× | decimated |
Both outputs are nonblank 1800×840 PNGs. The metric is figure construction through a completed compressed PNG, excluding imports, data generation and warm-up. XY uses the disclosed M4-decimated tier for this row; Matplotlib/Agg paints every sample. Preserve extrema and disclose the tier in every comparison.
These are diagnostic results from three repetitions on a shared workstation, with one warm-up, recorded during the 2026-11-05 release audit. Confirm the gap on a controlled runner before selecting an optimization. This does not establish a regression from v0.0.8.
Reproduce
Audited source: 5e58b12c0a1b89a58c4555af370204ef1ed0515e plus local release-validation fixes. Environment: Linux x86_64, 12 logical CPUs, CPython 3.14.6, NumPy 2.5.1, Matplotlib 3.11.0, native XY core, Rust 1.96.0.
Harness prerequisite: the audited upstream bench_pyplot_vs_matplotlib.py omits export DPI in _xy_render. Set its save call to the following before measuring, matching the Matplotlib adapter:
fig.savefig(out, format="png", dpi=EXPORT_DPI)
Both adapters build at 100 DPI and export at 200 DPI. Without that correction, the harness fails its dimension check before producing a valid comparison. The correction and output-size regression test are prepared locally on farhan/release-validation, but have not landed upstream.
cargo build --release
uv sync --extra matplotlib --group dev
uv pip install 'matplotlib==3.11.0'
MPLBACKEND=Agg uv run --no-sync python benchmarks/bench_pyplot_vs_matplotlib.py \
--profile smoke --reps 3 --warmups 1 \
--json /tmp/pyplot-smoke.json
The harness runs all six families; inspect the line row. For confirmation and the existing standard target gate:
MPLBACKEND=Agg uv run --no-sync python benchmarks/bench_pyplot_vs_matplotlib.py \
--profile standard --reps 21 --warmups 3 \
--target-speedup 10 --require-target \
--json /tmp/pyplot-standard.json
--require-target gates every family, so a failure in another family does not by itself establish this issue's outcome.
Raw observations
[
{
"library": "xy.pyplot",
"total_samples_ms": [
9.282415,
12.12937,
11.45841
],
"build_median_ms": 0.492518,
"render_median_ms": 10.854134,
"total_median_ms": 11.45841,
"total_p95_ms": 12.12937,
"png_bytes": 150193
},
{
"library": "matplotlib",
"total_samples_ms": [
80.364108,
82.328557,
82.23864
],
"build_median_ms": 3.908362,
"render_median_ms": 78.330278,
"total_median_ms": 82.23864,
"total_p95_ms": 82.328557,
"png_bytes": 92530
}
]
Acceptance
- Reproduce on a controlled runner and record environment, exact commit, raw samples, output dimensions and tier decisions.
- Profile build, rasterization and PNG encoding separately; optimize the measured bottleneck.
- Meet the existing standard-profile 10× total-time target for line, or explicitly revise the specification with reproducible evidence explaining why the target is not met.
- Retain image correctness, labels and dimensions; do not achieve the target by silently reducing visual quality or dropping data.
- Record smoke, standard and huge profile results and output sizes, and add a meaningful regression benchmark.
- Update benchmark evidence and specifications with the resulting behavior.
The local audit report and complete raw comparison are prepared under spec/process/release-validation/2026-11-05/; they are currently uncommitted. The observations above are included here so this issue is reproducible without access to that worktree.
- Lingua principale
- Python
- Stelle
- 1.9k
- Fork
- 79
- Merge medio
- 1g 39m
- PR unite (30g)
- 22
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di reflex-dev/xy
-
Skip finite/log visibility scans when zone maps already prove all-finite on linear axesForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertaneeds investigate performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
reflex-dev/xy#169 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
reflex-dev/xy#556 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
reflex-dev/xy#552 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
reflex-dev/xy#551 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
reflex-dev/xy#523 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di reflex-dev/xy
Issue simili
-
[Bug]: graphify query loads every language extractor just for _file_stem (about 34 ms per call)Forse già presa @rohit-jsfreaky l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Graphify-Labs/graphify#5160 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Variable declared without a value suppresses ${VAR:-default} expansionForse già presa @Omarinho12345 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
theskumar/python-dotenv#750 ·
I maintainer di solito rispondono entro 12 giorni
-
Minor bug: Main page buttonApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Operations on a list[T] | None var throw when the value is NoneForse già presa @masenf l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
reflex-dev/reflex#7826 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
UKGovernmentBEIS/control-arena#947 ·
I maintainer di solito rispondono entro 1 giorno