[Perf] Rolling motion: every frame rebuilds and publishes all presented points, even when nothing reads them
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- data-visualization, performance
Direzione di ricerca
Start with the rolling transform presentation track in packages/charts-core/src/motion.ts and the handlePresentationPoints path in packages/charts-core/src/renderer.ts. Reproduce by streaming data into a rolling line chart with no pointer or focus, then profile a roll to confirm the per-frame work. Compare the two proposed approaches and check that presented points are available when interaction begins while idle frames avoid unnecessary rebuilds, publishes, and filtering.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
A rolling-window chart pays a per-frame cost proportional to its row count for points nothing reads.
- Each rolling
transformplan gets a presentation track whoseapplyre-creates every point of the element, plus the exiting ones, as{ ...point, x, y }keyed bypointIdentity(point)(motion.ts:3442-3453). - Every tick then calls
lifecycle.publish(motion.ts:3999), which copies the whole map into a new array (motion.ts:3598). - The renderer's
handlePresentationPointsfilters that array withviewportInteractionPointsbefore it checks for a pointer or a focused point, so with neither the result is discarded (renderer.ts:1223-1246).
Use case: a live line that streams back to back 600 ms rolls of about 220 smoothed rows per mark (area, line and tail). With per-track timers, the points track is 77% of each frame's sampling (0.13 ms per call). In a production build the motion tick is about 0.23 ms per frame, about 131 ms of requestAnimationFrame time per 6 s of streaming, with no pointer over the chart. The DOM writes the roll needs are a small part of that.
Repro
Mount any line chart with a rolling window and keep appending data with no pointer and no focus. Profile one roll: apply runs on every frame for every row, and handlePresentationPoints runs viewportInteractionPoints every frame and then returns.
Proposal
Either:
- derive presented points lazily from the plan's transform when a subscriber or
getPresentationPointsactually needs them; or - skip the per-frame rebuild, publish and filter while there is no pointer, focus or tooltip, and publish once when one appears.
Related: #195 (rolling windows). Checked against 57774e14a1a86081eddb3a23523724a40da05640 (v1.1.0).
- Lingua principale
- TypeScript
- Stelle
- 819
- Fork
- 49
- Merge medio
- 4h 40m
- PR unite (30g)
- 16
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 TanStack/charts
-
[Bug] Focus guides: `url(#id)` paints ignore `idPrefix`Forse già presa @getdownandcode l’ha presa 2 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TanStack/charts#211 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Printed charts keep their screen width: resize redraw waits for an animation frameForse già presa @piecyk l’ha presa 2 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
[Feature] Readable outside labels for crowded pie and donut chartsForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
TanStack/charts#227 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 42/100
TanStack/charts#216 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 57/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di TanStack/charts
Issue simili
-
Add: Yemen Education SDApertastreams:add
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
apache/rocketmq-dashboard#6872 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
interledger/publisher-tools#931 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ARTPARK-SAHAI-ORG/calibrate-frontend#727 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
fab-geocommuns/RNB-site#539 ·
I maintainer di solito rispondono entro 2 giorni