-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
VS Code starts slowly when the Settings editor is open #179486
Comments
@Rigel-Developer What version of VS Code is this? |
@Rigel-Developer Does this happen when starting/reload with no editor open, a text file open, or the settings editor open? |
Without version info it's hard to pin-point the issue but there is some listener that is doing too much while/after scanning extensions and updating the configuration model. My qualified guess is that this is the settings editors. When running out of source it shows really terrible performance (freezing the renderer for ~500ms on my very fast machine) and the "shape of the traces" look very similar |
Versión: 1.77.1 (user setup) |
Every time I open the application it is very slow new project or loading one is always slow |
\gifPlease |
Thanks for reporting this issue! Unfortunately, it's hard for us to understand what issue you're seeing. Please help us out by providing a screen recording showing exactly what isn't working as expected. While we can work with most standard formats, If the issue depends on keyboard input, you can help us by enabling screencast mode for the recording ( Happy coding! |
@rzhao271 With these steps I can reproduce the freeze
This aligns with my (out of dev) profiling and the attached CPU profile. Check minified source code of the 1.77.1 release and the |
\closedWith 600b519 |
I do see an improvement 🥳 but not a big one, using a temporary profile I see a speed up from 60ms to 30ms but with my real world profile (that I selfhost on) I see times of 120+ms for opening the settings editor. My setup is very average wrt the number of extensions (and therefore settings) that I have installed. Given my machine's performance is far above average I'd it fair to assume real world opening times of 500ms to 1sec. @rzhao271 Profile shows that most time is spend in |
Inspect is more than just sending whole configuration data. A key can have different values at different targets/overrides and inspect gives you all these values.
All these values have to be frozen so that the caller wont mess up with the source. It is already smart to freeze them only when asked for the specific target. At present effective value is always computed when asked to inspect. May be I could also make it on demand. @rzhao271 Can you please let me know how you are using inspect and what accessor of inspect result is taking time? |
@rzhao271 One observation is that opening a settings editor is calling the |
#190100 adds in a change that calls inspect more lazily. @jrieken let me know if you notice an improvement or have any concerns. One remaining area of potential improvement I know of would be to use BeforeAfter |
@rzhao271 Thanks for doing the change |
👏 Nice, so much better now |
Closing this issue for verification. |
-
prof-QZ5MV1W0.main.cpuprofile.txt
-
prof-QZ5MV1W0.renderer.cpuprofile.txt
prof-QZ5MV1W0.main.cpuprofile.txt
prof-QZ5MV1W0.renderer.cpuprofile.txt
The text was updated successfully, but these errors were encountered: