microsoft / vscode

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

slow startup and opening files due to Recently Opened files history #147122

Closed Die4Ever closed 2 years ago

Die4Ever commented 2 years ago

Issue Type: Performance Issue

Startup and opening files has been slow lately, with startup actually showing a blank screen, it's was like this before the update and I was hoping the update would fix the issue but it didn't. So I decided to look into it. Disabling all extensions didn't help. Seems that moving my AppData\Roaming\Code\User\globalStorage folder fixed it, and then I put the folder back and now it's slow again.

VS Code version: Code 1.66.1 (8dfae7a5cd50421d10cd99cb873990460525a898, 2022-04-06T14:50:12.141Z) OS version: Windows_NT x64 10.0.19043 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 5 2600 Six-Core Processor (12 x 3394)| |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.93GB (7.84GB free)| |Process Argv|--crash-reporter-id f00a391a-a19c-4685-90ca-e04656351694| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 0 115 11220 code main 0 126 1020 shared-process 0 77 4392 fileWatcher 0 74 17932 ptyHost 0 71 2184 window (undefined) 0 38 3264 utility-network-service 0 208 3532 window (Startup Performance - Visual Studio Code) 0 97 11520 gpu-process 0 26 14656 crashpad-handler 0 145 14932 extensionHost 0 74 7820 "C:\Program Files\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node "c:\Program Files\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=14932 0 81 10632 "C:\Program Files\Microsoft VS Code\Code.exe" --ms-enable-electron-run-as-node c:\Users\die4e\.vscode\extensions\redhat.vscode-yaml-1.6.0\dist\languageserver.js --node-ipc --clientProcessId=14932 0 87 20196 issue-reporter ```
Workspace Info ``` ; ```
Extensions (19) Extension|Author (truncated)|Version ---|---|--- atlascode|atl|2.10.11 EditorConfig|Edi|0.16.4 vscode-unrealscript|Eri|0.0.2 remotefs|lix|0.0.16 grep|mag|1.1.0 regionfolder|map|1.0.17 python|ms-|2022.4.1 vscode-pylance|ms-|2022.4.0 jupyter|ms-|2022.3.1000901801 jupyter-keymap|ms-|1.0.0 jupyter-renderers|ms-|1.0.6 remote-containers|ms-|0.231.5 remote-ssh|ms-|0.78.0 remote-ssh-edit|ms-|0.80.0 remote-wsl|ms-|0.66.0 vscode-remote-extensionpack|ms-|0.21.0 vscode-yaml|red|1.6.0 sc2galaxy|tal|1.10.5 grep2file|yun|0.5.4
A/B Experiments ``` vsliv368cf:30146710 vsreu685:30147344 python383cf:30185419 vspor879:30202332 vspor708:30202333 vspor363:30204092 pythonvspyl392:30443607 pythontb:30283811 pythonvspyt551cf:30345471 pythonptprofiler:30281270 vshan820:30294714 vstes263:30335439 vscoreces:30445986 pythondataviewer:30285071 vscod805:30301674 pythonvspyt200:30340761 binariesv615:30325510 bridge0708:30335490 bridge0723:30353136 vsaa593:30376534 vsc1dst:30438360 pythonvs932:30410667 wslgetstarted:30449410 pythonvsnew555:30457759 vscscmwlcmt:30465135 vscaat:30438848 pynewfile477:30463512 ```
Die4Ever commented 2 years ago

image

blank screen on startup

also when closing the program, sometimes I see "Discarding backups is taking a bit longer" or something like that

Die4Ever commented 2 years ago

I've narrowed the problem down to this single file state.vscdb, if I rename it then startup is fast again and if I put the file back then it's slow again

idk if there's a way I could privately share the file?

Die4Ever commented 2 years ago

actually just File -> Open Recent -> Clear Recently Opened fixed the issue for me even with the old state.vscdb file

before:

image

after:

image

so maybe it's a combination with another file

Die4Ever commented 2 years ago

here's my code --prof-startup after doing Clear Recently Opened

## System Info * Code: 1.66.1 (8dfae7a5cd50421d10cd99cb873990460525a898) * OS: win32(10.0.19043) * CPUs: AMD Ryzen 5 2600 Six-Core Processor (12 x 3394) * Memory(System): 15.93 GB(8.36GB free) * Memory(Process): 174.46 MB working set(139.93MB private, 0.21MB shared) * VM(likelihood): 0% * Initial Startup: true * Has 0 other windows * Screen Reader Active: false * Empty Workspace: true ## Performance Marks | What | Duration | Process | Info | | --------------------------------------------------------------- | -------- | ------------------------- | ----------------------------------------------------------- | | start => app.isReady | 80 | [main] | initial startup: true | | nls:start => nls:end | 0 | [main] | initial startup: true | | require(main.bundle.js) | 61 | [main] | initial startup: true | | start crash reporter | 26 | [main] | initial startup: true | | serve main IPC handle | 2 | [main] | initial startup: true | | create window | 38 | [main] | initial startup: true, state: 0ms, widget: 16ms, show: 20ms | | app.isReady => window.loadUrl() | 148 | [main] | initial startup: true | | window.loadUrl() => begin to require(workbench.desktop.main.js) | 188 | [main->renderer] | NewWindow | | require(workbench.desktop.main.js) | 328 | [renderer] | cached data: YES, node_modules took 0ms | | wait for window config | 0 | [renderer] | - | | init storage (global & workspace) | 14 | [renderer] | - | | init workspace service | 27 | [renderer] | - | | register extensions & spawn extension host | 216 | [renderer] | - | | restore viewlet | 25 | [renderer] | workbench.view.explorer | | restore panel | 0 | [renderer] | - | | restore & resolve visible editors | 98 | [renderer] | 1: workbench.editors.gettingStartedInput | | overall workbench load | 379 | [renderer] | - | | workbench ready | 1157 | [main->renderer] | - | | renderer ready | 748 | [renderer] | - | | shared process connection ready | 0 | [renderer->sharedprocess] | - | | extensions registered | 1471 | [renderer] | - | ## Extension Activation Stats | Extension | Eager | Load Code | Call Activate | Finish Activate | Event | By | | --------------------------------------- | ----- | --------- | ------------- | --------------- | --------------------------------- | --------------------------------------- | | vscode.debug-auto-launch | true | 4 | 1 | 3 | * | vscode.debug-auto-launch | | vscode.git | true | 13 | 5 | 59 | * | vscode.git | | vscode.git-base | true | 3 | 0 | 3 | * | vscode.git | | vscode.github | true | 4 | 0 | 1 | * | vscode.github | | vscode.ipynb | true | 3 | 1 | 2 | * | vscode.ipynb | | atlassian.atlascode | true | 148 | 26 | 0 | * | atlassian.atlascode | | EditorConfig.EditorConfig | true | 25 | 0 | 2 | * | EditorConfig.EditorConfig | | maptz.regionfolder | true | 13 | 0 | 1 | * | maptz.regionfolder | | redhat.vscode-yaml | true | 141 | 0 | 23 | * | atlassian.atlascode | | vscode.configuration-editing | false | 3 | 0 | 1 | onLanguage:jsonc | vscode.configuration-editing | | vscode.emmet | false | 7 | 2 | 8 | onStartupFinished | vscode.emmet | | vscode.extension-editing | false | 5 | 0 | 1 | onLanguage:markdown | vscode.extension-editing | | vscode.github-authentication | false | 18 | 1 | 1 | onAuthenticationRequest:github | vscode.github-authentication | | vscode.json-language-features | false | 11 | 0 | 26 | onLanguage:jsonc | vscode.json-language-features | | vscode.markdown-language-features | false | 24 | 1 | 0 | onLanguage:markdown | vscode.markdown-language-features | | vscode.markdown-math | false | 4 | 0 | 0 | api | vscode.markdown-language-features | | vscode.merge-conflict | false | 2 | 1 | 7 | onStartupFinished | vscode.merge-conflict | | vscode.microsoft-authentication | false | 17 | 0 | 59 | onAuthenticationRequest:microsoft | vscode.microsoft-authentication | | ms-vscode-remote.remote-wsl-recommender | false | 7 | 3 | 5 | onStartupFinished | ms-vscode-remote.remote-wsl-recommender | | vscode.typescript-language-features | false | 8 | 1 | 1 | onLanguage:jsonc | vscode.typescript-language-features | | ms-vscode-remote.remote-containers | false | 32 | 1 | 71 | onStartupFinished | ms-vscode-remote.remote-containers | | ms-vscode-remote.remote-wsl | false | 9 | 3 | 1 | onStartupFinished | ms-vscode-remote.remote-wsl | ## Raw Perf Marks: main ``` Name Timestamp Delta Total code/timeOrigin 1649458410117 0 0 code/didStartMain 1649458410198 81 81 code/willStartCrashReporter 1649458410219 21 102 code/didStartCrashReporter 1649458410245 26 128 code/mainAppReady 1649458410278 33 161 code/willLoadMainBundle 1649458410286 8 169 code/fork/willLoadCode 1649458410301 15 184 code/registerFilesystem/file 1649458410345 44 228 code/didLoadMainBundle 1649458410347 2 230 code/willStartMainServer 1649458410351 4 234 code/didStartMainServer 1649458410353 2 236 code/willCreateCodeWindow 1649458410384 31 267 code/willRestoreCodeWindowState 1649458410384 0 267 code/didRestoreCodeWindowState 1649458410384 0 267 code/willCreateCodeBrowserWindow 1649458410385 1 268 code/didCreateCodeBrowserWindow 1649458410401 16 284 code/willMaximizeCodeWindow 1649458410401 0 284 code/didMaximizeCodeWindow 1649458410421 20 304 code/didCreateCodeWindow 1649458410422 1 305 code/willOpenNewWindow 1649458410426 4 309 ``` ## Raw Perf Marks: renderer ``` Name Timestamp Delta Total code/timeOrigin 1649458410427 0 0 code/didStartRenderer 1649458410607 180 180 code/willWaitForWindowConfig 1649458410607 0 180 code/didWaitForWindowConfig 1649458410607 0 180 code/willShowPartsSplash 1649458410607 0 180 code/didShowPartsSplash 1649458410608 1 181 code/willLoadWorkbenchMain 1649458410614 6 187 code/didLoadWorkbenchMain 1649458410942 328 515 code/registerFilesystem/file 1649458410943 1 516 code/registerFilesystem/vscode-userdata 1649458410943 0 516 code/willInitWorkspaceService 1649458410945 2 518 code/willInitStorage 1649458410945 0 518 code/willInitUserConfiguration 1649458410958 13 531 code/didInitStorage 1649458410959 1 532 code/didInitUserConfiguration 1649458410962 3 535 code/willInitWorkspaceConfiguration 1649458410962 0 535 code/didInitWorkspaceConfiguration 1649458410972 10 545 code/didInitWorkspaceService 1649458410972 0 545 code/willStartWorkbench 1649458410976 4 549 code/LifecyclePhase/Ready 1649458411037 61 610 code/registerFilesystem/trustedDomains 1649458411062 25 635 code/registerFilesystem/vscode-local-history 1649458411064 2 637 code/willRestoreEditors 1649458411257 193 830 code/willRestoreViewlet 1649458411307 50 880 code/didRestoreViewlet 1649458411332 25 905 code/didRestoreEditors 1649458411355 23 928 code/LifecyclePhase/Restored 1649458411355 0 928 code/didStartWorkbench 1649458411355 0 928 code/didRemovePartsSplash 1649458411355 0 928 code/registerFilesystem/vscode-debug-memory 1649458411359 4 932 code/willConnectSharedProcess 1649458411383 24 956 code/willLoadExtensions 1649458411453 70 1026 code/willHandleExtensionPoints 1649458411512 59 1085 code/didHandleExtensionPoints 1649458411664 152 1237 code/didLoadExtensions 1649458411669 5 1242 ``` ## Raw Perf Marks: localExtHost ``` Name Timestamp Delta Total code/timeOrigin 1649458411506 0 0 code/fork/start 1649458411601 95 95 code/fork/willLoadCode 1649458411629 28 123 code/extHost/willConnectToRenderer 1649458411767 138 261 code/extHost/didConnectToRenderer 1649458411769 2 263 code/extHost/didWaitForInitData 1649458411915 146 409 code/extHost/didCreateServices 1649458411926 11 420 code/extHost/willWaitForConfig 1649458411931 5 425 code/extHost/didWaitForConfig 1649458412047 116 541 code/extHost/didInitAPI 1649458412048 1 542 code/extHost/didInitProxyResolver 1649458412053 5 547 code/extHost/ready 1649458412053 0 547 code/extHost/willLoadExtensionCode/vscode.microsoft-authentication 1649458412060 7 554 code/extHost/didLoadExtensionCode/vscode.microsoft-authentication 1649458412077 17 571 code/extHost/willLoadExtensionCode/vscode.debug-auto-launch 1649458412077 0 571 code/extHost/didLoadExtensionCode/vscode.debug-auto-launch 1649458412081 4 575 code/extHost/willLoadExtensionCode/vscode.git-base 1649458412081 0 575 code/extHost/didLoadExtensionCode/vscode.git-base 1649458412084 3 578 code/extHost/willLoadExtensionCode/vscode.ipynb 1649458412085 1 579 code/extHost/didLoadExtensionCode/vscode.ipynb 1649458412088 3 582 code/extHost/willLoadExtensionCode/redhat.vscode-yaml 1649458412088 0 582 code/extHost/didLoadExtensionCode/redhat.vscode-yaml 1649458412229 141 723 code/extHost/willLoadExtensionCode/EditorConfig.EditorConfig 1649458412230 1 724 code/extHost/didLoadExtensionCode/EditorConfig.EditorConfig 1649458412255 25 749 code/extHost/willLoadExtensionCode/maptz.regionfolder 1649458412255 0 749 code/extHost/didLoadExtensionCode/maptz.regionfolder 1649458412268 13 762 code/extHost/willActivateExtension/vscode.microsoft-authentication 1649458412272 4 766 code/extHost/willActivateExtension/vscode.debug-auto-launch 1649458412272 0 766 code/extHost/willActivateExtension/vscode.git-base 1649458412273 1 767 code/extHost/willActivateExtension/vscode.ipynb 1649458412273 0 767 code/extHost/willActivateExtension/redhat.vscode-yaml 1649458412274 1 768 code/extHost/willActivateExtension/EditorConfig.EditorConfig 1649458412274 0 768 code/extHost/willActivateExtension/maptz.regionfolder 1649458412275 1 769 code/extHost/didActivateExtension/vscode.debug-auto-launch 1649458412283 8 777 code/extHost/didActivateExtension/vscode.git-base 1649458412283 0 777 code/extHost/didActivateExtension/vscode.ipynb 1649458412283 0 777 code/extHost/didActivateExtension/EditorConfig.EditorConfig 1649458412283 0 777 code/extHost/didActivateExtension/maptz.regionfolder 1649458412283 0 777 code/extHost/didActivateExtension/redhat.vscode-yaml 1649458412297 14 791 code/extHost/willLoadExtensionCode/vscode.git 1649458412313 16 807 code/extHost/didLoadExtensionCode/vscode.git 1649458412326 13 820 code/extHost/willLoadExtensionCode/vscode.github 1649458412326 0 820 code/extHost/didLoadExtensionCode/vscode.github 1649458412330 4 824 code/extHost/didActivateExtension/vscode.microsoft-authentication 1649458412331 1 825 code/extHost/willActivateExtension/vscode.git 1649458412353 22 847 code/extHost/willActivateExtension/vscode.github 1649458412358 5 852 code/extHost/didActivateExtension/vscode.github 1649458412362 4 856 code/extHost/willLoadExtensionCode/vscode.github-authentication 1649458412378 16 872 code/extHost/didLoadExtensionCode/vscode.github-authentication 1649458412396 18 890 code/extHost/willActivateExtension/vscode.github-authentication 1649458412399 3 893 code/extHost/didActivateExtension/vscode.github-authentication 1649458412402 3 896 code/extHost/didActivateExtension/vscode.git 1649458412418 16 912 code/extHost/willLoadExtensionCode/atlassian.atlascode 1649458412430 12 924 code/extHost/didLoadExtensionCode/atlassian.atlascode 1649458412578 148 1072 code/extHost/willActivateExtension/atlassian.atlascode 1649458412580 2 1074 code/extHost/didActivateExtension/atlassian.atlascode 1649458412611 31 1105 ``` ## Node Cached Data Stats ### cached data used ### cached data missed ### cached data rejected ### cached data created (lazy, might need refreshes)

just noticed the initial post didn't have this startup performance info automatically... let me get that, I still have a backup of the file

Die4Ever commented 2 years ago

this was the code --prof-startup from before clearing recently opened files

also I noticed this message in the console output

[main 2022-04-08T23:12:00.534Z] window#load: attempt to load window (id: 1)
[main 2022-04-08T23:12:00.554Z] update#setState idle
[main 2022-04-08T23:12:00.589Z] ExtensionHostStarterWorker created
[1708:0408/181201.845:ERROR:jump_list.cc(301)] Failed to append custom category 'Recent Folders' to Jump List due to system privacy settings.
[main 2022-04-08T23:12:02.762Z] window#load: window reported ready (id: 1)
[main 2022-04-08T23:12:03.453Z] Starting extension host with pid 19040 (fork() took 12 ms).
[main 2022-04-08T23:12:03.454Z] ExtensionHostStarterWorker.start() took 16 ms.
[1708:0408/181215.179:ERROR:jump_list.cc(301)] Failed to append custom category 'Recent Folders' to Jump List due to system privacy settings.

it seemed to hit that failure to append every time I opened a file

## System Info * Code: 1.66.1 (8dfae7a5cd50421d10cd99cb873990460525a898) * OS: win32(10.0.19043) * CPUs: AMD Ryzen 5 2600 Six-Core Processor (12 x 3394) * Memory(System): 15.93 GB(8.26GB free) * Memory(Process): 173.67 MB working set(138.78MB private, 1.83MB shared) * VM(likelihood): 0% * Initial Startup: true * Has 0 other windows * Screen Reader Active: false * Empty Workspace: true ## Performance Marks | What | Duration | Process | Info | | --------------------------------------------------------------- | -------- | ------------------------- | ---------------------------------------------------------- | | start => app.isReady | 73 | [main] | initial startup: true | | nls:start => nls:end | 0 | [main] | initial startup: true | | require(main.bundle.js) | 64 | [main] | initial startup: true | | start crash reporter | 22 | [main] | initial startup: true | | serve main IPC handle | 1 | [main] | initial startup: true | | create window | 45 | [main] | initial startup: true, state: 0ms, widget: 44ms, show: 0ms | | app.isReady => window.loadUrl() | 157 | [main] | initial startup: true | | window.loadUrl() => begin to require(workbench.desktop.main.js) | 1414 | [main->renderer] | NewWindow | | require(workbench.desktop.main.js) | 331 | [renderer] | cached data: YES, node_modules took 0ms | | wait for window config | 0 | [renderer] | - | | init storage (global & workspace) | 15 | [renderer] | - | | init workspace service | 29 | [renderer] | - | | register extensions & spawn extension host | 1552 | [renderer] | - | | restore viewlet | 0 | [renderer] | - | | restore panel | 0 | [renderer] | - | | restore & resolve visible editors | 30 | [renderer] | 1: workbench.editors.gettingStartedInput | | overall workbench load | 258 | [renderer] | - | | workbench ready | 2269 | [main->renderer] | - | | renderer ready | 632 | [renderer] | - | | shared process connection ready | 0 | [renderer->sharedprocess] | - | | extensions registered | 3907 | [renderer] | - | ## Extension Activation Stats | Extension | Eager | Load Code | Call Activate | Finish Activate | Event | By | | --------------------------------------- | ----- | --------- | ------------- | --------------- | --------------------------------- | --------------------------------------- | | vscode.debug-auto-launch | true | 3 | 0 | 2 | * | vscode.debug-auto-launch | | vscode.git | true | 13 | 5 | 43 | * | vscode.git | | vscode.git-base | true | 2 | 0 | 2 | * | vscode.git | | vscode.github | true | 6 | 0 | 1 | * | vscode.github | | vscode.ipynb | true | 3 | 1 | 1 | * | vscode.ipynb | | atlassian.atlascode | true | 116 | 14 | 0 | * | atlassian.atlascode | | EditorConfig.EditorConfig | true | 21 | 0 | 1 | * | EditorConfig.EditorConfig | | maptz.regionfolder | true | 10 | 1 | 0 | * | maptz.regionfolder | | redhat.vscode-yaml | true | 122 | 0 | 15 | * | atlassian.atlascode | | vscode.configuration-editing | false | 3 | 1 | 2 | onLanguage:jsonc | vscode.configuration-editing | | vscode.emmet | false | 7 | 2 | 8 | onStartupFinished | vscode.emmet | | vscode.extension-editing | false | 7 | 0 | 0 | onLanguage:json | vscode.extension-editing | | vscode.github-authentication | false | 13 | 0 | 1 | onAuthenticationRequest:github | vscode.github-authentication | | vscode.json-language-features | false | 14 | 0 | 38 | onLanguage:jsonc | vscode.json-language-features | | vscode.markdown-language-features | false | 44 | 3 | 0 | onLanguage:markdown | vscode.markdown-language-features | | vscode.markdown-math | false | 5 | 0 | 0 | api | vscode.markdown-language-features | | vscode.merge-conflict | false | 2 | 1 | 7 | onStartupFinished | vscode.merge-conflict | | vscode.microsoft-authentication | false | 29 | 0 | 308 | onAuthenticationRequest:microsoft | vscode.microsoft-authentication | | ms-vscode-remote.remote-wsl-recommender | false | 6 | 4 | 4 | onStartupFinished | ms-vscode-remote.remote-wsl-recommender | | vscode.npm | false | 12 | 0 | 4 | onLanguage:json | vscode.npm | | vscode.typescript-language-features | false | 9 | 2 | 1 | onLanguage:jsonc | vscode.typescript-language-features | | ms-vscode-remote.remote-containers | false | 36 | 0 | 1806 | onStartupFinished | ms-vscode-remote.remote-containers | | ms-vscode-remote.remote-wsl | false | 9 | 3 | 1 | onStartupFinished | ms-vscode-remote.remote-wsl | ## Raw Perf Marks: main ``` Name Timestamp Delta Total code/timeOrigin 1649459339969 0 0 code/didStartMain 1649459340048 79 79 code/willStartCrashReporter 1649459340065 17 96 code/didStartCrashReporter 1649459340087 22 118 code/mainAppReady 1649459340121 34 152 code/willLoadMainBundle 1649459340128 7 159 code/fork/willLoadCode 1649459340143 15 174 code/registerFilesystem/file 1649459340190 47 221 code/didLoadMainBundle 1649459340192 2 223 code/willStartMainServer 1649459340197 5 228 code/didStartMainServer 1649459340198 1 229 code/willCreateCodeWindow 1649459340228 30 259 code/willRestoreCodeWindowState 1649459340229 1 260 code/didRestoreCodeWindowState 1649459340229 0 260 code/willCreateCodeBrowserWindow 1649459340229 0 260 code/didCreateCodeBrowserWindow 1649459340273 44 304 code/didCreateCodeWindow 1649459340273 0 304 code/willOpenNewWindow 1649459340278 5 309 ``` ## Raw Perf Marks: renderer ``` Name Timestamp Delta Total code/timeOrigin 1649459340279 0 0 code/didStartRenderer 1649459341685 1406 1406 code/willWaitForWindowConfig 1649459341685 0 1406 code/didWaitForWindowConfig 1649459341685 0 1406 code/willShowPartsSplash 1649459341685 0 1406 code/didShowPartsSplash 1649459341686 1 1407 code/willLoadWorkbenchMain 1649459341692 6 1413 code/didLoadWorkbenchMain 1649459342023 331 1744 code/registerFilesystem/file 1649459342024 1 1745 code/registerFilesystem/vscode-userdata 1649459342024 0 1745 code/willInitWorkspaceService 1649459342026 2 1747 code/willInitStorage 1649459342026 0 1747 code/willInitUserConfiguration 1649459342040 14 1761 code/didInitStorage 1649459342041 1 1762 code/didInitUserConfiguration 1649459342044 3 1765 code/willInitWorkspaceConfiguration 1649459342044 0 1765 code/didInitWorkspaceConfiguration 1649459342055 11 1776 code/didInitWorkspaceService 1649459342055 0 1776 code/willStartWorkbench 1649459342059 4 1780 code/LifecyclePhase/Ready 1649459342120 61 1841 code/registerFilesystem/trustedDomains 1649459342143 23 1864 code/registerFilesystem/vscode-local-history 1649459342144 1 1865 code/willRestoreEditors 1649459342287 143 2008 code/didRestoreEditors 1649459342317 30 2038 code/LifecyclePhase/Restored 1649459342317 0 2038 code/didStartWorkbench 1649459342317 0 2038 code/didRemovePartsSplash 1649459342317 0 2038 code/registerFilesystem/vscode-debug-memory 1649459342321 4 2042 code/willConnectSharedProcess 1649459342344 23 2065 code/willLoadExtensions 1649459342403 59 2124 code/willHandleExtensionPoints 1649459343823 1420 3544 code/didHandleExtensionPoints 1649459343950 127 3671 code/didLoadExtensions 1649459343955 5 3676 ``` ## Raw Perf Marks: localExtHost ``` Name Timestamp Delta Total code/timeOrigin 1649459343809 0 0 code/fork/start 1649459343887 78 78 code/fork/willLoadCode 1649459343907 20 98 code/extHost/willConnectToRenderer 1649459344048 141 239 code/extHost/didConnectToRenderer 1649459344050 2 241 code/extHost/didWaitForInitData 1649459344087 37 278 code/extHost/didCreateServices 1649459344094 7 285 code/extHost/willWaitForConfig 1649459344097 3 288 code/extHost/didWaitForConfig 1649459344137 40 328 code/extHost/didInitAPI 1649459344153 16 344 code/extHost/didInitProxyResolver 1649459344156 3 347 code/extHost/ready 1649459344157 1 348 code/extHost/willLoadExtensionCode/vscode.debug-auto-launch 1649459344160 3 351 code/extHost/didLoadExtensionCode/vscode.debug-auto-launch 1649459344163 3 354 code/extHost/willLoadExtensionCode/vscode.git-base 1649459344164 1 355 code/extHost/didLoadExtensionCode/vscode.git-base 1649459344166 2 357 code/extHost/willLoadExtensionCode/vscode.ipynb 1649459344166 0 357 code/extHost/didLoadExtensionCode/vscode.ipynb 1649459344169 3 360 code/extHost/willLoadExtensionCode/redhat.vscode-yaml 1649459344170 1 361 code/extHost/didLoadExtensionCode/redhat.vscode-yaml 1649459344291 121 482 code/extHost/willLoadExtensionCode/EditorConfig.EditorConfig 1649459344292 1 483 code/extHost/didLoadExtensionCode/EditorConfig.EditorConfig 1649459344313 21 504 code/extHost/willLoadExtensionCode/maptz.regionfolder 1649459344313 0 504 code/extHost/didLoadExtensionCode/maptz.regionfolder 1649459344323 10 514 code/extHost/willActivateExtension/vscode.debug-auto-launch 1649459344326 3 517 code/extHost/willActivateExtension/vscode.git-base 1649459344326 0 517 code/extHost/willActivateExtension/vscode.ipynb 1649459344326 0 517 code/extHost/willActivateExtension/redhat.vscode-yaml 1649459344327 1 518 code/extHost/willActivateExtension/EditorConfig.EditorConfig 1649459344327 0 518 code/extHost/willActivateExtension/maptz.regionfolder 1649459344327 0 518 code/extHost/didActivateExtension/vscode.debug-auto-launch 1649459344329 2 520 code/extHost/didActivateExtension/vscode.git-base 1649459344329 0 520 code/extHost/didActivateExtension/vscode.ipynb 1649459344329 0 520 code/extHost/didActivateExtension/EditorConfig.EditorConfig 1649459344329 0 520 code/extHost/didActivateExtension/maptz.regionfolder 1649459344329 0 520 code/extHost/didActivateExtension/redhat.vscode-yaml 1649459344342 13 533 code/extHost/willLoadExtensionCode/vscode.git 1649459344349 7 540 code/extHost/didLoadExtensionCode/vscode.git 1649459344362 13 553 code/extHost/willLoadExtensionCode/vscode.github 1649459344363 1 554 code/extHost/didLoadExtensionCode/vscode.github 1649459344369 6 560 code/extHost/willActivateExtension/vscode.git 1649459344372 3 563 code/extHost/willActivateExtension/vscode.github 1649459344377 5 568 code/extHost/didActivateExtension/vscode.github 1649459344383 6 574 code/extHost/didActivateExtension/vscode.git 1649459344420 37 611 code/extHost/willLoadExtensionCode/atlassian.atlascode 1649459344429 9 620 code/extHost/didLoadExtensionCode/atlassian.atlascode 1649459344545 116 736 code/extHost/willActivateExtension/atlassian.atlascode 1649459344548 3 739 code/extHost/didActivateExtension/atlassian.atlascode 1649459344565 17 756 ``` ## Node Cached Data Stats ### cached data used ### cached data missed ### cached data rejected ### cached data created (lazy, might need refreshes)
bpasero commented 2 years ago

The perf marks of before and after differ, but do not really indicate a long hang. Seems that in the slow case, the workbench was still ready after 2 seconds?:

workbench ready | 2269 vs workbench ready | 1157

Maybe this could be related:

Failed to append custom category 'Recent Folders' to Jump List due to system privacy settings

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

Die4Ever commented 2 years ago

The perf marks of before and after differ, but do not really indicate a long hang. Seems that in the slow case, the workbench was still ready after 2 seconds?:

workbench ready | 2269 vs workbench ready | 1157

Maybe this could be related:

Failed to append custom category 'Recent Folders' to Jump List due to system privacy settings

Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

honestly, twice as slow does seem like a big difference to me, but yes I think the 'Recent Folders' issue is the bigger problem because the difference is more than 1 second, and the delay happens every time I open a file not just starting the program, I can feel the stall

I tried the insider build with my old state.vscdb file and got similar results again

C:\Users\die4e\AppData\Local\Programs\Microsoft VS Code Insiders>"Code - Insiders.exe" --prof-startup

C:\Users\die4e\AppData\Local\Programs\Microsoft VS Code Insiders>
[main 2022-04-13T00:14:56.716Z] window#load: attempt to load window (id: 1)
[main 2022-04-13T00:14:56.740Z] update#setState idle
[main 2022-04-13T00:14:56.777Z] ExtensionHostStarterWorker created
[20024:0412/191458.051:ERROR:jump_list.cc(301)] Failed to append custom category 'Recent Folders' to Jump List due to system privacy settings.
[main 2022-04-13T00:14:58.974Z] window#load: window reported ready (id: 1)
[main 2022-04-13T00:14:59.917Z] Starting extension host with pid 11364 (fork() took 12 ms).
[main 2022-04-13T00:14:59.918Z] ExtensionHostStarterWorker.start() took 13 ms.
[main 2022-04-13T00:15:00.046Z] SharedProcess: on vscode:createSharedProcessMessageChannel
[main 2022-04-13T00:15:00.263Z] SharedProcess: IPC ready
[main 2022-04-13T00:15:00.505Z] SharedProcess: Overall ready
[main 2022-04-13T00:15:26.757Z] update#setState checking for updates
[main 2022-04-13T00:15:26.834Z] update#setState idle
Startup Performance ## System Info * Code - Insiders: 1.67.0-insider (27dd7b41b6a830d5ea8eb896d5b2bb9c4bcd95ee) * OS: win32(10.0.19043) * CPUs: AMD Ryzen 5 2600 Six-Core Processor (12 x 3394) * Memory(System): 15.93 GB(8.43GB free) * Memory(Process): 175.75 MB working set(148.36MB private, 1.42MB shared) * VM(likelihood): 0% * Initial Startup: true * Has 0 other windows * Screen Reader Active: false * Empty Workspace: true ## Performance Marks | What | Duration | Process | Info | | --------------------------------------------------------------- | -------- | ------------------------- | ---------------------------------------------------------- | | start => app.isReady | 78 | [main] | initial startup: true | | nls:start => nls:end | 0 | [main] | initial startup: true | | require(main.bundle.js) | 63 | [main] | initial startup: true | | start crash reporter | 25 | [main] | initial startup: true | | serve main IPC handle | 2 | [main] | initial startup: true | | create window | 38 | [main] | initial startup: true, state: 0ms, widget: 38ms, show: 0ms | | app.isReady => window.loadUrl() | 154 | [main] | initial startup: true | | window.loadUrl() => begin to require(workbench.desktop.main.js) | 1435 | [main->renderer] | NewWindow | | require(workbench.desktop.main.js) | 327 | [renderer] | cached data: YES, node_modules took 0ms | | wait for window config | 0 | [renderer] | - | | init storage (global & workspace) | 26 | [renderer] | - | | init workspace service | 42 | [renderer] | - | | register extensions & spawn extension host | 1320 | [renderer] | - | | restore viewlet | 0 | [renderer] | - | | restore panel | 0 | [renderer] | - | | restore & resolve visible editors | 1207 | [renderer] | 1: workbench.editors.files.fileEditorInput | | overall workbench load | 1495 | [renderer] | - | | workbench ready | 3537 | [main->renderer] | - | | renderer ready | 1877 | [renderer] | - | | shared process connection ready | 0 | [renderer->sharedprocess] | - | | extensions registered | 3713 | [renderer] | - | ## Extension Activation Stats | Extension | Eager | Load Code | Call Activate | Finish Activate | Event | By | | --------------------------------------- | ----- | --------- | ------------- | --------------- | --------------------------------- | --------------------------------------- | | vscode.debug-auto-launch | true | 6 | 0 | 2 | * | vscode.debug-auto-launch | | vscode.git | true | 16 | 4 | 57 | * | vscode.git | | vscode.git-base | true | 5 | 0 | 2 | * | vscode.git | | vscode.github | true | 8 | 1 | 1 | * | vscode.github | | vscode.ipynb | true | 5 | 0 | 2 | * | vscode.ipynb | | vscode.emmet | false | 8 | 3 | 7 | onStartupFinished | vscode.emmet | | vscode.extension-editing | false | 19 | 1 | 3 | onLanguage:markdown | vscode.extension-editing | | vscode.github-authentication | false | 15 | 1 | 1 | onAuthenticationRequest:github | vscode.github-authentication | | vscode.markdown-language-features | false | 64 | 3 | 0 | onLanguage:markdown | vscode.markdown-language-features | | vscode.markdown-math | false | 10 | 0 | 0 | api | vscode.markdown-language-features | | vscode.merge-conflict | false | 5 | 1 | 6 | onStartupFinished | vscode.merge-conflict | | vscode.microsoft-authentication | false | 19 | 1 | 64 | onAuthenticationRequest:microsoft | vscode.microsoft-authentication | | ms-vscode-remote.remote-wsl-recommender | false | 9 | 6 | 1 | onStartupFinished | ms-vscode-remote.remote-wsl-recommender | ## Raw Perf Marks: main ``` Name Timestamp Delta Total code/timeOrigin 1649808896401 0 0 code/didStartMain 1649808896485 84 84 code/willStartCrashReporter 1649808896504 19 103 code/didStartCrashReporter 1649808896529 25 128 code/mainAppReady 1649808896563 34 162 code/willLoadMainBundle 1649808896573 10 172 code/fork/willLoadCode 1649808896588 15 187 code/registerFilesystem/file 1649808896634 46 233 code/didLoadMainBundle 1649808896636 2 235 code/willStartMainServer 1649808896640 4 239 code/didStartMainServer 1649808896642 2 241 code/willCreateCodeWindow 1649808896675 33 274 code/willRestoreCodeWindowState 1649808896675 0 274 code/didRestoreCodeWindowState 1649808896675 0 274 code/willCreateCodeBrowserWindow 1649808896675 0 274 code/didCreateCodeBrowserWindow 1649808896713 38 312 code/didCreateCodeWindow 1649808896713 0 312 code/willOpenNewWindow 1649808896717 4 316 ``` ## Raw Perf Marks: renderer ``` Name Timestamp Delta Total code/timeOrigin 1649808896718 0 0 code/didStartRenderer 1649808898145 1427 1427 code/willWaitForWindowConfig 1649808898146 1 1428 code/didWaitForWindowConfig 1649808898146 0 1428 code/willShowPartsSplash 1649808898146 0 1428 code/didShowPartsSplash 1649808898146 0 1428 code/willLoadWorkbenchMain 1649808898152 6 1434 code/didLoadWorkbenchMain 1649808898479 327 1761 code/registerFilesystem/file 1649808898480 1 1762 code/registerFilesystem/vscode-userdata 1649808898480 0 1762 code/willInitWorkspaceService 1649808898482 2 1764 code/willInitStorage 1649808898482 0 1764 code/willInitUserConfiguration 1649808898507 25 1789 code/didInitStorage 1649808898508 1 1790 code/didInitUserConfiguration 1649808898512 4 1794 code/willInitWorkspaceConfiguration 1649808898512 0 1794 code/didInitWorkspaceConfiguration 1649808898524 12 1806 code/didInitWorkspaceService 1649808898524 0 1806 code/willStartWorkbench 1649808898527 3 1809 code/LifecyclePhase/Ready 1649808898594 67 1876 code/registerFilesystem/trustedDomains 1649808898619 25 1901 code/registerFilesystem/vscode-local-history 1649808898620 1 1902 code/registerFilesystem/vscode-debug-memory 1649808898727 107 2009 code/willRestoreEditors 1649808898815 88 2097 code/willLoadExtensions 1649808898878 63 2160 code/didRestoreEditors 1649808900022 1144 3304 code/LifecyclePhase/Restored 1649808900022 0 3304 code/didStartWorkbench 1649808900022 0 3304 code/didRemovePartsSplash 1649808900022 0 3304 code/willConnectSharedProcess 1649808900044 22 3326 code/willHandleExtensionPoints 1649808900081 37 3363 code/didHandleExtensionPoints 1649808900192 111 3474 code/didLoadExtensions 1649808900198 6 3480 ``` ## Raw Perf Marks: localExtHost ``` Name Timestamp Delta Total code/timeOrigin 1649808899930 0 0 code/fork/start 1649808900011 81 81 code/fork/willLoadCode 1649808900034 23 104 code/extHost/willConnectToRenderer 1649808900200 166 270 code/extHost/didConnectToRenderer 1649808900201 1 271 code/extHost/didWaitForInitData 1649808900399 198 469 code/extHost/didCreateServices 1649808900424 25 494 code/extHost/willWaitForConfig 1649808900438 14 508 code/extHost/didWaitForConfig 1649808900474 36 544 code/extHost/didInitAPI 1649808900494 20 564 code/extHost/didInitProxyResolver 1649808900497 3 567 code/extHost/ready 1649808900497 0 567 code/extHost/willLoadExtensionCode/vscode.microsoft-authentication 1649808900501 4 571 code/extHost/didLoadExtensionCode/vscode.microsoft-authentication 1649808900520 19 590 code/extHost/willLoadExtensionCode/vscode.debug-auto-launch 1649808900521 1 591 code/extHost/didLoadExtensionCode/vscode.debug-auto-launch 1649808900527 6 597 code/extHost/willLoadExtensionCode/vscode.git-base 1649808900527 0 597 code/extHost/didLoadExtensionCode/vscode.git-base 1649808900532 5 602 code/extHost/willLoadExtensionCode/vscode.ipynb 1649808900533 1 603 code/extHost/didLoadExtensionCode/vscode.ipynb 1649808900538 5 608 code/extHost/willActivateExtension/vscode.microsoft-authentication 1649808900542 4 612 code/extHost/willActivateExtension/vscode.debug-auto-launch 1649808900543 1 613 code/extHost/willActivateExtension/vscode.git-base 1649808900543 0 613 code/extHost/willActivateExtension/vscode.ipynb 1649808900543 0 613 code/extHost/didActivateExtension/vscode.debug-auto-launch 1649808900550 7 620 code/extHost/didActivateExtension/vscode.git-base 1649808900550 0 620 code/extHost/didActivateExtension/vscode.ipynb 1649808900550 0 620 code/extHost/willLoadExtensionCode/vscode.git 1649808900565 15 635 code/extHost/didLoadExtensionCode/vscode.git 1649808900581 16 651 code/extHost/willLoadExtensionCode/vscode.github 1649808900581 0 651 code/extHost/didLoadExtensionCode/vscode.github 1649808900589 8 659 code/extHost/didActivateExtension/vscode.microsoft-authentication 1649808900607 18 677 code/extHost/willActivateExtension/vscode.git 1649808900609 2 679 code/extHost/willActivateExtension/vscode.github 1649808900613 4 683 code/extHost/didActivateExtension/vscode.github 1649808900617 4 687 code/extHost/willLoadExtensionCode/vscode.github-authentication 1649808900631 14 701 code/extHost/didLoadExtensionCode/vscode.github-authentication 1649808900646 15 716 code/extHost/willActivateExtension/vscode.github-authentication 1649808900647 1 717 code/extHost/didActivateExtension/vscode.github-authentication 1649808900651 4 721 code/extHost/didActivateExtension/vscode.git 1649808900670 19 740 ``` ## Node Cached Data Stats ### cached data used ### cached data missed ### cached data rejected ### cached data created (lazy, might need refreshes)
bpasero commented 2 years ago

With the old DB, does it fix when you clear recently opened (from the command palette)?

Die4Ever commented 2 years ago

With the old DB, does it fix when you clear recently opened (from the command palette)?

Yes that does fix it

bpasero commented 2 years ago

Maybe there is one path in the history that falls under some restrictions?