You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chart.base.svelte previously built its ChartState props via () => ({ ref, context, ...props, xDomain, yDomain }). The ...props spread on Svelte 5's $props() proxy fans out into recursive ownKeys traversals across nested rest/spread proxies and a get per key — repeated whenever any prop changed. On pages with many <Chart> instances the spread cost dominated hydration, blocking the main thread for tens of seconds.
ChartState now stores the $props() proxy directly (props: ChartProps instead of props = $derived(propsGetter())). Brush-domain selections, previously merged into the spread, are passed as a separate { brushXDomain, brushYDomain } getter argument and applied at the three internal domain-resolution sites. chartState.props.X reads still go through the proxy and remain reactive, but no spread is performed.
Internal change only — ChartState's public surface is unchanged for component consumers.
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
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.
Chart.base.sveltepreviously built itsChartStateprops via() => ({ ref, context, ...props, xDomain, yDomain }). The...propsspread on Svelte 5's$props()proxy fans out into recursiveownKeystraversals across nested rest/spread proxies and agetper key — repeated whenever any prop changed. On pages with many<Chart>instances the spread cost dominated hydration, blocking the main thread for tens of seconds.ChartStatenow stores the$props()proxy directly (props: ChartPropsinstead ofprops = $derived(propsGetter())). Brush-domain selections, previously merged into the spread, are passed as a separate{ brushXDomain, brushYDomain }getter argument and applied at the three internal domain-resolution sites.chartState.props.Xreads still go through the proxy and remain reactive, but no spread is performed.Internal change only —
ChartState's public surface is unchanged for component consumers.