Specific keyword as route name causes it to become slower than others
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 20.8k
- Forks
- 2.3k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 156
Description
Describe the bug
If you name a route /home it will cause the page to load much slower (~300ms for me), however if you create a route named /test for example (in the same directory), it will load quickly (~35ms). Not sure if it is only the word home, or if it also involves other keywords as well. There's nothing in my code that would cause /home to load slower than other routes either (hooks, etc).
I had another member of the Discord also test on their machine, and they confirmed the issue as well.
Note: This does only seem to be a development mode issue, there is not lag/delay after the site is built and in production.
Reproduction
I've created a minimal reproduction here https://github.com/dihmeetree/svelte-bug-repro
Logs
No response
System Info
System:
OS: macOS 14.4.1
CPU: (10) arm64 Apple M1 Max
Memory: 31.81 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.0 - /usr/local/bin/node
npm: 10.5.0 - /usr/local/bin/npm
bun: 1.0.36 - ~/.bun/bin/bun
Browsers:
Safari: 17.4.1
npmPackages:
@sveltejs/adapter-auto: ^3.2.0 => 3.2.0
@sveltejs/adapter-cloudflare: 4.2.0 => 4.2.0
@sveltejs/kit: 2.5.5 => 2.5.5
@sveltejs/vite-plugin-svelte: 3.0.2 => 3.0.2
svelte: 4.2.12 => 4.2.12
vite: 5.2.7 => 5.2.7
Severity
annoyance
Additional Information
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked minimal reproduction and compare the /home and /test routes in SvelteKit development mode using the reported package versions. Confirm whether the slowdown is limited to development, then trace the route handling involved and verify that /home loads comparably to /test without affecting production behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vite
- Domain
- performance, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100