Skip to content

Significant performance impact when using remote functions聽#14747

Closed

Description

@techniq

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.5

Severity

blocking an upgrade

Activity

  1. transferred this issue fromsveltejs/svelteon Oct 17, 2025
  2. dummdidumm commented on Feb 7, 2026

    @dummdidumm
    Member

    Is this still an issue given all the recent perf work in Svelte? i.e. if you update to the latest version does it still drop in perf compared to not using remote functions?

  3. techniq commented on Feb 7, 2026

    @techniq
    ContributorAuthor

    Hey @dummdidumm, thanks for following up. The significant performance issues initially reported have definitely been fixed, thanks!

    We still see some minor performance regressions in Svelte compared to pre-async (<=5.35.0) especially when compared to LayerChart's pre-async/remote functions docs, but nothing to the point of blocking an upgrade at this point. We have these being tracked in sveltejs/svelte#17176, although they are at a level now that you need to compare before/after, as generally things feel pretty good. I've even considered closing #17176, but do think there is some opportunity left worth tracking.

    Thanks to the team for all the hard work! We really appreciate it 馃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions