-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Describe the bug
We have been exploring using remote function for the new LayerChart docs but have been encountering some performance issues (and I could 💯 be holding them wrong or have a bug in LayerChart).
For example, AreaChart has 5 examples which fetch large data from /static/*via prerender().
Loading the AreaChart page from navigation can take over 1 min
CleanShot.2025-10-17.at.09.52.47.mp4
but oddly if you refresh the page it only takes about 8 seconds
CleanShot.2025-10-17.at.09.58.33.mp4
I created an AreaChartSimple page which comments out these 5 examples, and navigation takes about 5 seconds
CleanShot.2025-10-17.at.10.12.55.mp4
The current docs takes about 4 seconds to a load all the examples (using +page.ts load())
CleanShot.2025-10-17.at.10.02.06.mp4
Note: There are some known performance regressions since ~5.36.0, but this is much more significant.
Reproduction
Check out LayerChart PR 659 and run pnpm dev (or run pnpm package in packages/layerchart and pnpm dev in docs)
Navigating to AreaChart or any other route using remote functions (search $derived(await) will present the slow performance on navigation. See AreaChartSimple or other routes which do not use remote functions for comparison.
You can also run the current docs by running pnpm dev:svelte in packages/layerchart
Logs
System Info
System:
OS: macOS 15.5
CPU: (10) arm64 Apple M1 Max
Memory: 75.89 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.17.0 - /Users/techniq/Library/Caches/fnm_multishells/33654_1760650476647/bin/node
npm: 10.9.2 - /Users/techniq/Library/Caches/fnm_multishells/33654_1760650476647/bin/npm
pnpm: 10.18.2 - /Users/techniq/Library/pnpm/pnpm
bun: 1.1.33 - /Users/techniq/.bun/bin/bun
Browsers:
Brave Browser: 136.1.78.102
Chrome: 141.0.7390.108
Firefox: 143.0.1
Safari: 18.5Severity
blocking an upgrade