-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: log stats in debug mode #614
Conversation
hmm, you can disable the compile stats in dev/build or completely. The purpose of the info log was mostly to make this information accessible to regular users as debug is very noisy. Even with vite's recent enhancements to performance tracking, it would be hard to get information aggregated by svelte dependency out of it. But I did not receive any feedback from the logged stats, so if you think this is detrimental to do by default, maybe instead of moving it do debug level, we should just switch the default value of the config flag to true (or rather rename it to enableCompileStats)? https://github.com/sveltejs/vite-plugin-svelte/blob/main/docs/config.md#disablecompilestats |
Maybe we can expose the stats under a specific namespace like I'm not sure about showing the stats by default since it isn't always useful for user's projects, as it's only helpful for large Svelte deps, or large Svelte SSR files. Even then with the info presented, the user might not be looking into fixing it just yet. If they have to enable |
Updated to use a namespace:
|
Log client/server compile stats in debug mode instead of info. This has been bugging me for a while since it shows up in debug and CI logs by default, making debugging hard 😅
IIUC it's shown so that users understand what's taking so long to compile/prebundle. I checked Vite 4.3 with prebundling, and it only had a 1.5s improvement (10.5s in Vite 4.3). The bottleneck seems to still be in the Svelte compiler according to the cpuprofile.