vscode icon indicating copy to clipboard operation
vscode copied to clipboard

The startup is very slow, but it starts quickly with the command 'code --prof-startup'

Open dhbxs opened this issue 7 months ago • 2 comments

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.100.0
  • OS Version: Windows 11 24H2 26100.3775

Steps to Reproduce:

  1. The startup is very slow, but it starts quickly with the command 'code -- pro startup'
  2. Launch VS Code takes 10+ seconds..
  3. F1 - Startup Performance: Please refer to the attachment

Startup Performance.txt

dhbxs avatar May 13 '25 09:05 dhbxs

I think you mean code --prof-startup.

Any extension causing your slow startup? Did you try code --disable-extensions?

If it works correcly, then you may find the offending extension F1 and Help: Start Extension Bisect

albertosantini avatar May 13 '25 10:05 albertosantini

The attached file is the Startup Performance file from when I launched using the code --disable-extensions command, and it wasn't any faster than a normal startup.

Startup Performance-code --disable-extensions.txt

dhbxs avatar May 14 '25 00:05 dhbxs

Can you capture a runtime trace following the steps below,

  1. Start the application with --trace --trace-category-filter="base,browser,startup,content,navigation,loading,renderer_host,renderer,blink,v8,disabled-by-default-v8.cpu_profiler,disabled-by-default-loading,disabled-by-default-lifecycles,disabled-by-default-base"
  2. Once the workspace finishes loading, open command palette and choose Developer: Stop Tracing
  3. Please attach the generated trace file to this issue

deepak1556 avatar May 30 '25 09:05 deepak1556

Can you capture a runtime trace following the steps below,能否按照以下步骤捕获运行时跟踪,

  1. Start the application with --trace --trace-category-filter="base,browser,startup,content,navigation,loading,renderer_host,renderer,blink,v8,disabled-by-default-v8.cpu_profiler,disabled-by-default-loading,disabled-by-default-lifecycles,disabled-by-default-base"
  2. Once the workspace finishes loading, open command palette and choose Developer: Stop Tracing
  3. Please attach the generated trace file to this issue

Yes, of course. Please refer to the attachment.

code-es5aOaOi.trace.txt.zip

dhbxs avatar May 30 '25 09:05 dhbxs

Thanks, from the trace it does confirm the 10s delay happens in the navigation stage

Image

However I don't see any cpu samples from the application code that is contributing to the delay

Image

deepak1556 avatar May 30 '25 10:05 deepak1556

There could be an external factor, can you capture a system cpu profile following the steps

  • Download the latest release of https://github.com/mstange/samply/releases
  • Start from the command line with following samply.exe record -s -o slowstartup.json.gz --browsers --keep-etl --main-thread-only -- code.cmd --js-flags="--enable-etw-stack-walking --interpreted-frames-native-stack"
  • Wait for the workbench to finish loading
  • Quit the application

You should have files slowstartup.json.gz, slowstartup.user.etl generated under the same folder as where samply.exe exists. Please send those files to [email protected] and do not attach them to this issue. Thanks!

deepak1556 avatar May 30 '25 10:05 deepak1556

There could be an external factor, can you capture a system cpu profile following the steps

  • Download the latest release of https://github.com/mstange/samply/releases
  • Start from the command line with following samply.exe record -s -o slowstartup.json.gz --browsers --keep-etl --main-thread-only -- code.cmd --js-flags="--enable-etw-stack-walking --interpreted-frames-native-stack"
  • Wait for the workbench to finish loading
  • Quit the application

You should have files slowstartup.json.gz, slowstartup.user.etl generated under the same folder as where samply.exe exists. Please send those files to [email protected] and do not attach them to this issue. Thanks!

Will this file contain any privacy information? What kind of privacy information will it capture?

dhbxs avatar Jun 03 '25 01:06 dhbxs