microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.07k stars 29.24k forks source link

slow start up #204243

Open Lalithallu opened 9 months ago

Lalithallu commented 9 months ago

Type: Performance Issue

when i installed a new update of vs code 1.86 then onwards the my vs code is opening slowly in previous version it works very well and opens very fast. Please retify the bug ASAP

VS Code version: Code 1.86.0 (05047486b6df5eb8d44b2ecd70ea3bdf775fd937, 2024-01-31T10:28:19.990Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i5-12500H (16 x 3110)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.63GB (7.93GB free)| |Process Argv|--crash-reporter-id 0d6eb380-2e85-4fb9-abe6-8f5cb6750682| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 0 109 12328 code main 0 152 328 window [1] (Welcome - git - Visual Studio Code) 0 49 6900 utility-network-service 0 131 7596 extensionHost [1] 0 91 15496 shared-process 0 28 17336 crashpad-handler 0 97 18028 window [2] (Issue Reporter) 0 83 18876 fileWatcher [1] 0 92 21996 ptyHost 0 7 19000 conpty-agent 0 65 19812 C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command "try { . \"c:\Users\allul\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\contrib\terminal\browser\media\shellIntegration.ps1\" } catch {}" 0 167 23652 gpu-process ```
Workspace Info ``` | Window (Welcome - git - Visual Studio Code) | Folder (git): 2 files | File types: txt(1) | Conf files:; ```
Extensions (15) Extension|Author (truncated)|Version ---|---|--- prettier-vscode|esb|10.1.0 code-runner|for|0.12.1 debugpy|ms-|2024.0.0 python|ms-|2024.0.0 vscode-pylance|ms-|2023.12.1 live-server|ms-|0.4.13 java|red|1.27.0 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.2.30 vscode-java-debug|vsc|0.56.0 vscode-java-dependency|vsc|0.23.4 vscode-java-pack|vsc|0.25.15 vscode-java-test|vsc|0.40.1 vscode-maven|vsc|0.44.0 vscode-icons|vsc|12.7.0
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30951796 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 accentitlementst:30887150 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 dsvsc019b:30953937 3ef8e399:30949928 ```
gjsjohnmurray commented 9 months ago

/confirmPlease

vscodenpa commented 9 months ago

Please diagnose the root cause of the issue by running the command F1 > Help: Troubleshoot Issue and following the instructions. Once you have done that, please update the issue with the results.

Happy Coding!

BLuedtke commented 9 months ago

Just to chime in - When I'm using F1 > Help: Troubleshoot Issue, that reloads the window just fine. But it is unclear if I'm allowed to completely close the VS Code application and the Troubleshoot mode will still be active. Anyway, it seems to remain active on a restart.

In the two scenarios the Troubleshooting presented (all Extensions disabled & Extension bisection), I could still reproduce the issue. When starting the Application, the VS Code window opens, but it is all grey. It takes several seconds longer than expected for the editors and the left hand explorer to appear (15+ seconds). VS Code (or Plasma?) prompts me that VS Code is unresponsive in the meantime: "The Windows is not responding. You can reopen or close the window to keep waiting [...]".
I'm on Kubuntu 22.04. I would love to provide journal logs etc.; will add once I can convince my system to show me the log, there seems to be some unrelated issue with that at the moment.

Sometimes, this lockup/window freeze also happens sometime during normal VS Code operation, but I haven't yet found a pattern.

Edit: I have downgraded to 1.85.2 and can confirm that the long startup (/startup freeze) is no longer present.

eddy147 commented 9 months ago

Since a couple of days I noticed also a slow(er) startup. this is my Startup Performance: startup_performance.txt

pktiuk commented 8 months ago

I have similar problem on Linux

qdrop17 commented 8 months ago

I am experiencing the same issue on Fedora 39.

I've completely uninstalled and reinstalled Visual Studio Code, including its configuration files, by executing the following commands:

sudo dnf erase code
rm -r .vscode
rm -r .config/Code
sudo dnf install code

Unfortunately, this didn't resolve the problem. I'm unable to launch a fresh installation of Visual Studio Code without encountering an error message:

image

The issue also occurs with Visual Studio Code Insiders. When I select "Keep waiting", the application eventually starts. However, it intermittently freezes for several seconds while in use.

I'm currently running Fedora 39 on Wayland, and all my packages are up to date.

In addition, I've attached the startup diagnostics data for your reference: vscode-startup.log

Any assistance you can provide would be greatly appreciated.

TheRealAgentK commented 8 months ago

This helped me:

https://github.com/microsoft/vscode/issues/193188#issuecomment-1965664266

qdrop17 commented 8 months ago

This helped me:

#193188 (comment)

Confirmed, this fixes (or works around) the issue :-) Thank you so much! I suggest to leave the issue open for the contributors to close.

qdrop17 commented 8 months ago

Ok, I can narrow down the issue further: When I use https://github.com/bayasdev/envycontrol to disable my Nvidia dGPU inside my laptop, the start of VScode is very, very slow and the app stutters from time to time.

When the dGPU is active though, VScode behaves as expected. Since I use the Nvidia dGPU only with a dualbooted windows for gaming, I would appreciate it if VScode handles this properly (like every single other app on my Fedora 39).

pktiuk commented 7 months ago

@Lalithallu

Why you marked this issue as completed?
There is a workaround, but this issue still exists. Vscode should handle this case by default. (just as @qdrop17 said)

Could you please reopen this issue? (and edit title to something more verbose like slow startup when dGPU is disabled)

pktiuk commented 6 months ago

@deepak1556 @DonJayamanne

Please reopen.

Lalithallu commented 6 months ago

yeah ok

On Sun, Apr 14, 2024 at 7:06 PM Paweł Kotiuk @.***> wrote:

@deepak1556 https://github.com/deepak1556 @DonJayamanne https://github.com/DonJayamanne

Please reopen.

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/204243#issuecomment-2054064139, or unsubscribe https://github.com/notifications/unsubscribe-auth/BETBEJCLNYM5IRCNA5YKGQTY5KA4LAVCNFSM6AAAAABCYEQ5ZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJUGA3DIMJTHE . You are receiving this because you were mentioned.Message ID: @.***>

BLuedtke commented 6 months ago

Happy to provide traces/logs if needed by the VS Code dev team, though as far as I can see, there were some already provided in the other issue linked/mentioned.

This seems to be a chromium issue, as was noted in the other issue. Could mean that VS Code devs can't really do anything about it. I wonder if it is related to this Chromium Bugtracker Entry at all: https://issues.chromium.org/issues/40283032 As that was created roundabout the same timeframe as this issue.

In fact, I can confirm that that same workaround works for google-chrome-stable on Linux. Without --disable-gpu --disable-software-rasterizer, it takes quite a while to start. With the options, it starts quickly. So I think this is on Chromium, not VS Code, and I doubt that the VS Code team can do anything about this.

tguvdamm commented 5 months ago

Hi just wanted to chime in and report that I've also had issues with slow startups. I get the same error screen and passing --disable-gpu resolves the issue.