Rolling transforms rebuild and publish every presented point on every frame, even with no pointer or focus
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- TypeScript
- スター
- 819
- フォーク
- 49
- 平均マージ
- 12時間 9分
- マージ済み PR(30日)
- 6
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/charts のほかの issue
-
Renderer treats a sub-pixel width difference as a resize, which cancels the `motion()` entranceオープン
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
TanStack/charts#182 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
brushX with `values` can shorten the selection range when it’s dragged to the plot edge対応中かも @andersk が 6 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
Grid and axis lines have no `shape-rendering` option, so hairlines anti-alias across two device rowsオープン
難易度 3/5 1〜2日 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
TanStack/charts の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
apache/rocketmq-dashboard#6610 ·
メンテナーはふだん 3 日以内に返信
-
nextjs-tracking
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
cloudflare/vinext#3920 ·
メンテナーはふだん 1 日以内に返信
-
Team:Dashboards
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
elastic/kibana#297299 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
analytics beginner friendly community contributions-welcome good first issue hacktoberfest help wanted up-for-grabs
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
affected/v17 affected/v18 area/frontend type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
umbraco/Umbraco-CMS#24186 ·
メンテナーはふだん 2 日以内に返信