Skip to content
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

application is slow to start - even with extensions disabled, extensions take the most loading time #154831

Closed
aaronpkelly opened this issue Jul 11, 2022 · 9 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster perf-startup

Comments

@aaronpkelly
Copy link

aaronpkelly commented Jul 11, 2022

Issue Type: Performance Issue

  • Install a lot of extenions
  • Disable all of them using Extensions -> "Disable All Installed Extensions"
  • Restart VS Code with all Extensions disabled
  • The Startup Performance report still gives the "extensions registered" stage a very high mark (in my case it's 9039ms, the the highest out of all stages!). I expect that this should not be the case, because extensions should be disabled

VS Code version: Code 1.68.1 (30d9c6c, 2022-06-14T12:48:58.283Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.81GB (6.09GB free)
Process Argv --crash-reporter-id 29ae55e9-cade-40fa-85c3-63768d641a1c
Screen Reader no
VM 0%
Process Info
CPU %	Mem MB	   PID	Process
    0	    93	   800	code main
    0	    28	  2716	   crashpad-handler
    0	   102	  3184	   shared-process
    0	    78	 19384	     fileWatcher
    0	    75	 20056	     ptyHost
    0	    49	  3564	   utility
    0	   187	  4784	   window (Startup Performance - trunk - Visual Studio Code [Administrator])
    0	    86	  6072	   issue-reporter
    0	   150	  9816	   gpu-process
    0	    46	 20140	   utility-network-service
    0	   106	 20756	   extensionHost
Workspace Info
|  Window (Startup Performance - trunk - Visual Studio Code [Administrator])
|    Folder (trunk): more than 20443 files
|      File types: class(2982) svn-base(2383) jar(1341) gz(1299) xsd(1218)
|                  xml(574) exe(525) java(472) jsp(452) log(431)
|      Conf files: makefile(6) package.json(3) dockerfile(1);
Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550

@vscodenpa
Copy link

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.69.0. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@aaronpkelly
Copy link
Author

I upgraded, restarted a couple of times, and then re-ran the performance report

The "extensions registered" stage is actually worse at 12370ms now, and it's still the highest item

Here's the updated details:

VS Code version: Code 1.69.0 (92d25e3, 2022-07-07T05:28:36.503Z)
OS version: Windows_NT x64 10.0.19042
Restricted Mode: No

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.81GB (6.59GB free)
Process Argv --crash-reporter-id 29ae55e9-cade-40fa-85c3-63768d641a1c
Screen Reader no
VM 0%
Extensions: none
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdf:30486550

@mjbvz mjbvz assigned jrieken and unassigned mjbvz Jul 12, 2022
@jrieken
Copy link
Member

jrieken commented Jul 12, 2022

/needsMoreInfo

The Startup Performance report still gives the "extensions registered" stage a very high mark (in my case it's 9039ms,

Please share the startup performance report here

@vscodenpa vscodenpa added the ~info-needed Issue requires more information from poster (with bot comment) label Jul 12, 2022
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@vscodenpa vscodenpa added info-needed Issue requires more information from poster and removed ~info-needed Issue requires more information from poster (with bot comment) labels Jul 12, 2022
@aaronpkelly
Copy link
Author

@jrieken ok I need to regenerate this report today for you. So I disabled all my extensions, closed the application, started it, and generated the Startup Performance report just now:

System Info

  • Code: 1.69.0 (92d25e3)
  • OS: win32(10.0.19042)
  • CPUs: Intel(R) Core(TM) i7-8665U CPU @ 1.90GHz(8 x 2112)
  • Memory(System): 15.81 GB(1.95GB free)
  • Memory(Process): 173.05 MB working set(135.98MB private, 0.25MB shared)
  • VM(likelihood): 0%
  • Initial Startup: true
  • Has 0 other windows
  • Screen Reader Active: false
  • Empty Workspace: false

Performance Marks

What Duration Process Info
start => app.isReady 1804 [main] initial startup: true
nls:start => nls:end 0 [main] initial startup: true
require(main.bundle.js) 88 [main] initial startup: true
start crash reporter 1704 [main] initial startup: true
serve main IPC handle 2 [main] initial startup: true
create window 56 [main] initial startup: true, state: 0ms, widget: 29ms, show: 26ms
app.isReady => window.loadUrl() 220 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 6420 [main->renderer] NewWindow
require(workbench.desktop.main.js) 454 [renderer] cached data: YES, node_modules took 0ms
wait for window config 0 [renderer] -
init storage (global & workspace) 15 [renderer] -
init workspace service 65 [renderer] -
register extensions & spawn extension host 3161 [renderer] -
restore viewlet 48 [renderer] workbench.view.explorer
restore panel 0 [renderer] -
restore & resolve visible editors 135 [renderer] 0:
overall workbench load 635 [renderer] -
workbench ready 9611 [main->renderer] -
renderer ready 1177 [renderer] -
shared process connection ready 0 [renderer->sharedprocess] -
extensions registered 12969 [renderer] -

Extension Activation Stats

Extension Eager Load Code Call Activate Finish Activate Event By
vscode.debug-auto-launch true 10 1 2 * vscode.debug-auto-launch
vscode.git true 33 126 868 * vscode.git
vscode.git-base true 9 0 2 * vscode.git
vscode.github true 10 1 2 * vscode.github
vscode.ipynb true 9 0 2 * vscode.ipynb
vscode.emmet false 9 5 12 onStartupFinished vscode.emmet
vscode.extension-editing false 19 2 7 onLanguage:markdown vscode.extension-editing
vscode.github-authentication false 25 0 2 onAuthenticationRequest:github vscode.github-authentication
vscode.markdown-language-features false 64 7 0 onLanguage:markdown vscode.markdown-language-features
vscode.markdown-math false 17 0 0 api vscode.markdown-language-features
vscode.merge-conflict false 6 2 10 onStartupFinished vscode.merge-conflict
vscode.microsoft-authentication false 70 0 506 onAuthenticationRequest:microsoft vscode.microsoft-authentication
ms-vscode-remote.remote-wsl-recommender false 17 10 5 onStartupFinished ms-vscode-remote.remote-wsl-recommender

Raw Perf Marks: main

Name	Timestamp	Delta	Total
code/timeOrigin	1657643481362	0	0
code/didStartMain	1657643481460	98	98
code/willStartCrashReporter	1657643481484	24	122
code/didStartCrashReporter	1657643483188	1704	1826
code/mainAppReady	1657643483264	76	1902
code/willLoadMainBundle	1657643483274	10	1912
code/fork/willLoadCode	1657643483291	17	1929
code/registerFilesystem/file	1657643483357	66	1995
code/didLoadMainBundle	1657643483362	5	2000
code/willStartMainServer	1657643483368	6	2006
code/didStartMainServer	1657643483370	2	2008
code/willCreateCodeWindow	1657643483421	51	2059
code/willRestoreCodeWindowState	1657643483421	0	2059
code/didRestoreCodeWindowState	1657643483421	0	2059
code/willCreateCodeBrowserWindow	1657643483422	1	2060
code/didCreateCodeBrowserWindow	1657643483451	29	2089
code/willMaximizeCodeWindow	1657643483451	0	2089
code/didMaximizeCodeWindow	1657643483477	26	2115
code/didCreateCodeWindow	1657643483477	0	2115
code/willOpenNewWindow	1657643483484	7	2122

Raw Perf Marks: renderer

Name	Timestamp	Delta	Total
code/timeOrigin	1657643483486	0	0
code/didStartRenderer	1657643489894	6408	6408
code/willWaitForWindowConfig	1657643489895	1	6409
code/didWaitForWindowConfig	1657643489895	0	6409
code/willShowPartsSplash	1657643489895	0	6409
code/didShowPartsSplash	1657643489896	1	6410
code/willLoadWorkbenchMain	1657643489904	8	6418
code/didLoadWorkbenchMain	1657643490358	454	6872
code/registerFilesystem/file	1657643490361	3	6875
code/registerFilesystem/vscode-userdata	1657643490361	0	6875
code/willInitWorkspaceService	1657643490366	5	6880
code/willInitStorage	1657643490367	1	6881
code/didInitStorage	1657643490382	15	6896
code/willInitUserConfiguration	1657643490387	5	6901
code/didInitUserConfiguration	1657643490404	17	6918
code/willInitWorkspaceConfiguration	1657643490404	0	6918
code/didInitWorkspaceConfiguration	1657643490431	27	6945
code/didInitWorkspaceService	1657643490431	0	6945
code/willStartWorkbench	1657643490436	5	6950
code/LifecyclePhase/Ready	1657643490541	105	7055
code/registerFilesystem/trustedDomains	1657643490572	31	7086
code/registerFilesystem/vscode-local-history	1657643490574	2	7088
code/willRestoreEditors	1657643490936	362	7450
code/willRestoreViewlet	1657643490941	5	7455
code/didRestoreViewlet	1657643490989	48	7503
code/willResolveExplorer	1657643491030	41	7544
code/didRestoreEditors	1657643491071	41	7585
code/LifecyclePhase/Restored	1657643491071	0	7585
code/didStartWorkbench	1657643491071	0	7585
code/didRemovePartsSplash	1657643491072	1	7586
code/registerFilesystem/vscode-debug-memory	1657643491085	13	7599
code/willConnectSharedProcess	1657643491129	44	7643
code/willLoadExtensions	1657643491268	139	7782
code/LifecyclePhase/Eventually	1657643493586	2318	10100
code/willHandleExtensionPoints	1657643494207	621	10721
code/didHandleExtensionPoints	1657643494420	213	10934
code/didLoadExtensions	1657643494429	9	10943

Raw Perf Marks: localExtHost

Name	Timestamp	Delta	Total
code/timeOrigin	1657643494107	0	0
code/fork/start	1657643494284	177	177
code/fork/willLoadCode	1657643494327	43	220
code/extHost/willConnectToRenderer	1657643494632	305	525
code/extHost/didConnectToRenderer	1657643494656	24	549
code/extHost/didWaitForInitData	1657643495004	348	897
code/extHost/didCreateServices	1657643495024	20	917
code/extHost/willWaitForConfig	1657643495037	13	930
code/extHost/didWaitForConfig	1657643495178	141	1071
code/extHost/didInitAPI	1657643495178	0	1071
code/extHost/didInitProxyResolver	1657643495192	14	1085
code/extHost/ready	1657643495192	0	1085
code/extHost/willLoadExtensionCode/vscode.microsoft-authentication	1657643495205	13	1098
code/extHost/didLoadExtensionCode/vscode.microsoft-authentication	1657643495275	70	1168
code/extHost/willLoadExtensionCode/vscode.debug-auto-launch	1657643495276	1	1169
code/extHost/didLoadExtensionCode/vscode.debug-auto-launch	1657643495286	10	1179
code/extHost/willLoadExtensionCode/vscode.git-base	1657643495291	5	1184
code/extHost/didLoadExtensionCode/vscode.git-base	1657643495300	9	1193
code/extHost/willLoadExtensionCode/vscode.ipynb	1657643495301	1	1194
code/extHost/didLoadExtensionCode/vscode.ipynb	1657643495310	9	1203
code/extHost/willActivateExtension/vscode.microsoft-authentication	1657643495314	4	1207
code/extHost/willActivateExtension/vscode.debug-auto-launch	1657643495314	0	1207
code/extHost/willActivateExtension/vscode.git-base	1657643495315	1	1208
code/extHost/willActivateExtension/vscode.ipynb	1657643495315	0	1208
code/extHost/didActivateExtension/vscode.debug-auto-launch	1657643495330	15	1223
code/extHost/didActivateExtension/vscode.git-base	1657643495330	0	1223
code/extHost/didActivateExtension/vscode.ipynb	1657643495330	0	1223
code/extHost/willLoadExtensionCode/vscode.git	1657643495344	14	1237
code/extHost/didLoadExtensionCode/vscode.git	1657643495377	33	1270
code/extHost/willLoadExtensionCode/vscode.github	1657643495378	1	1271
code/extHost/didLoadExtensionCode/vscode.github	1657643495388	10	1281
code/extHost/willActivateExtension/vscode.git	1657643495392	4	1285
code/extHost/willActivateExtension/vscode.github	1657643495518	126	1411
code/extHost/didActivateExtension/vscode.github	1657643495525	7	1418
code/extHost/didActivateExtension/vscode.microsoft-authentication	1657643495820	295	1713
code/extHost/willLoadExtensionCode/vscode.github-authentication	1657643496014	194	1907
code/extHost/didLoadExtensionCode/vscode.github-authentication	1657643496039	25	1932
code/extHost/willActivateExtension/vscode.github-authentication	1657643496045	6	1938
code/extHost/didActivateExtension/vscode.github-authentication	1657643496050	5	1943
code/extHost/didActivateExtension/vscode.git	1657643496386	336	2279

Node Cached Data Stats

cached data used

cached data missed

cached data rejected

cached data created (lazy, might need refreshes)

@jrieken
Copy link
Member

jrieken commented Jul 13, 2022

Thanks. In your case it takes very long to start and initialise processes, e.g app ready takes very long, getting the renderer up takes super long etc

@jrieken
Copy link
Member

jrieken commented Jul 13, 2022

Marking as /duplicate of #22087. You can try to configure your AV software as well, they are often the culprit of delayed process launchnig

@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label Jul 13, 2022
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@aaronpkelly
Copy link
Author

I'm using a work laptop and don't have the power to change anti-virus settings, but thank you for looking into this

@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster perf-startup
Projects
None yet
Development

No branches or pull requests

5 participants