perf: cache resolved kit files settings in incremental manifest#3023
perf: cache resolved kit files settings in incremental manifest#3023inq wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: dc2903f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
I am not sure this makes sense. As long as any svelte files are updated, the config still needs to be loaded. The svelte.config.js also has configs used by the Svelte compiler. Caching it isn't as useful as you might think. |
|
Hello! Thank you very much and Sorry for my bad English! But In these cases, I think it can be meaningful enhancements:
So I think it would be positive in every case! But if you think the scope is too small, you can close this! Thank you very much! |
|
One problem is that if the |
loadKitFilesSettingsdoes a dynamicimport()ofsvelte.config.json every--incrementalrun (~137 ms in my profile) just to read 4 paths underkit.files. This caches the resolved settings on the manifest, keyed by mtime+size. Manifest version bumped 3→4 to invalidate older caches.Measured on a SvelteKit app, warm median: 2.13 s → 2.05 s (3 samples each). Loosely related to #1538.