perf: reduce chart mounting and serialization work - #140
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (8)
📒 Files selected for processing (26)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe change updates SVG focus serialization, categorical scale inference, React chart mounting and hydration, escaping utilities, regression coverage, and related benchmark and release metadata. ChangesChart rendering and mounting
Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to The rendering and mounting optimizations retain the covered server, hydration, focus, animation, and scale behaviors, with no actionable merge risk identified. Sequence Diagram(s)sequenceDiagram
participant ReactDOM
participant RendererChart
participant SVGSurface
ReactDOM->>RendererChart: render server snapshot
RendererChart->>SVGSurface: prerender initial markup
ReactDOM->>RendererChart: hydrate client tree
RendererChart->>SVGSurface: mount and apply layout update
SVGSurface-->>ReactDOM: reuse existing SVG nodes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 2.78% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 36 functions across 19 files. (7 skipped: 7 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
View your CI Pipeline Execution ↗ for commit 67fe19b
☁️ Nx Cloud last updated this comment at |
Dense React charts built and serialized twice on client mount, and SVG mounts created a hidden focus circle for every data point. This removes the duplicate client work, creates default focus circles only when needed, and reduces SVG serialization and categorical domain allocation costs. Server rendering, hydration, authored focus layers, and animated updates retain their existing behavior.
Includes a patch changeset for the fixed package group, refreshed bundle and catalog preview evidence, and a package-check fix that gives its isolated consumer the repository's pinned package manager.
Validation:
Measured against 0.16.1 (
7117aca3), production React, Chromium, Apple M5 Pro, 500×300 heatmap with 10,000 cells, 10 warmups and 30 measured mounts per version, alternating order:Both versions use identical features and data, without animation. These are local chart measurements, not network loading or extrapolated dashboard totals.
Summary by CodeRabbit
New Features
Bug Fixes