Repository: vscode
Issue: Startup takes over 30 seconds, with or without extensions
Labels: freeze-slow-crash-leak,linux,under-discussion

![image](https://github.com/microsoft/vscode/assets/30046315/1dbc447c-681b-4dff-a27c-87f5e86a7679)

It takes around 30 seconds for VSCode to start, after pressing "wait" a few times. I do not know how to further debug the issue myself. No significant changes were made prior to when this started to happen.

Once successfully started, VSCode seems to run normally. Disabling extensions does not help.

## System Info

* Code: 1.82.0 (8b617bd08fd9e3fc94d14adb8d358b56e3f72314)
* OS: linux(6.2.0-32-generic)
* CPUs: 12th Gen Intel(R) Core(TM) i9-12900HK(20 x 3625)
* Memory(System): 31.01 GB(26.45GB free)
* Memory(Process): 204.75 MB working set(119.68MB private, 0.86MB 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                                            | 71       | [main]                    | initial startup: true                                      |
| nls:start => nls:end                                            | 0        | [main]                    | initial startup: true                                      |
| require(main.bundle.js)                                         | 67       | [main]                    | initial startup: true                                      |
| start crash reporter                                            | 2        | [main]                    | initial startup: true                                      |
| serve main IPC handle                                           | 1        | [main]                    | initial startup: true                                      |
| create window                                    
[prof-hzsgjWke.main.cpuprofile.txt](https://github.com/microsoft/vscode/files/12576007/prof-hzsgjWke.main.cpuprofile.txt)
[prof-hzsgjWke.renderer.cpuprofile.txt](https://github.com/microsoft/vscode/files/12576008/prof-hzsgjWke.renderer.cpuprofile.txt)
               | 20       | [main]                    | initial startup: true, state: 0ms, widget: 19ms, show: 0ms |
| app.isReady => window.loadUrl()                                 | 110      | [main]                    | initial startup: true                                      |
| window.loadUrl() => begin to require(workbench.desktop.main.js) | 35783    | [main->renderer]          | NewWindow                                                  |
| require(workbench.desktop.main.js)                              | 380      | [renderer]                | cached data: NO, node_modules took 0ms                     |
| wait for window config                                          | 1        | [renderer]                | -                                                          |
| init storage (global & workspace)                               | 12       | [renderer]                | -                                                          |
| init workspace service                                          | 20       | [renderer]                | -                                                          |
| register extensions & spawn extension host                      | 145      | [renderer]                | -                                                          |
| restore viewlet                                                 | 8        | [renderer]                | workbench.view.explorer                                    |
| restore panel                                                   | 0        | [renderer]                | -                                                          |
| restore & resolve visible editors                               | 38       | [renderer]                | 1: workbench.editors.gettingStartedInput                   |
| overall workbench load                                          | 151      | [renderer]                | -                                                          |
| workbench ready                                                 | 36521    | [main->renderer]          | -                                                          |
| renderer ready                                                  | 560      | [renderer]                | -                                                          |
| shared process connection ready                                 | 243      | [renderer->sharedprocess] | -                                                          |
| extensions registered                                           | 36715    | [renderer]                | -                                                          |


## Terminal Stats

| Name                                    | Timestamp     | Delta | Total |
| --------------------------------------- | ------------- | ----- | ----- |
| code/terminal/willGetTerminalBackend    | 1694434789966 | 0     | 0     |
| code/terminal/didGetTerminalBackend     | 1694434789966 | 0     | 0     |
| code/terminal/willReconnect             | 1694434789966 | 0     | 0     |
| code/terminal/willGetTerminalLayoutInfo | 1694434789966 | 0     | 0     |
| code/terminal/didGetTerminalLayoutInfo  | 1694434789968 | 2     | 2     |
| code/terminal/didReconnect              | 1694434789968 | 0     | 2     |
| code/terminal/willReplay                | 1694434789968 | 0     | 2     |
| code/terminal/didReplay                 | 1694434789968 | 0     | 2     |
| code/terminal/willGetPerformanceMarks   | 1694434789968 | 0     | 2     |
| code/terminal/didGetPerformanceMarks    | 1694434789972 | 4     | 6     |

## Raw Perf Marks: main

```
Name	Timestamp	Delta	Total
code/timeOrigin	1694434753040.625	0	0
code/didStartMain	1694434753159	118.375	118.375
code/willStartCrashReporter	1694434753165	6	124.375
code/didStartCrashReporter	1694434753167	2	126.375
code/mainAppReady	1694434753230	63	189.375
code/willGenerateNls	1694434753230	0	189.375
code/willLoadMainBundle	1694434753231	1	190.375
code/fork/willLoadCode	1694434753236	5	195.375
code/registerFilesystem/file	1694434753293	57	252.375
code/registerFilesystem/vscode-userdata	1694434753293	0	252.375
code/didLoadMainBundle	1694434753298	5	257.375
code/willStartMainServer	1694434753306	8	265.375
code/didStartMainServer	1694434753307	1	266.375
code/willCreateCodeWindow	1694434753319	12	278.375
code/willRestoreCodeWindowState	1694434753320	1	279.375
code/didRestoreCodeWindowState	1694434753320	0	279.375
code/willCreateCodeBrowserWindow	1694434753320	0	279.375
code/didCreateCodeBrowserWindow	1694434753339	19	298.375
code/willMaximizeCodeWindow	1694434753339	0	298.375
code/didMaximizeCodeWindow	1694434753339	0	298.375
code/didCreateCodeWindow	1694434753339	0	298.375
code/willOpenNewWindow	1694434753340	1	299.375
```
## Raw Perf Marks: localPtyHost

```
Name	Timestamp	Delta	Total
```
## Raw Perf Marks: renderer

```
Name	Timestamp	Delta	Total
code/timeOrigin	1694434753341	0	0
code/didStartRenderer	1694434789120	35779	35779
code/willWaitForWindowConfig	1694434789121	1	35780
code/didWaitForWindowConfig	1694434789122	1	35781
code/willShowPartsSplash	1694434789122	0	35781
code/didShowPartsSplash	1694434789122	0	35781
code/willLoadWorkbenchMain	1694434789123	1	35782
code/didLoadWorkbenchMain	1694434789503	380	36162
code/registerFilesystem/file	1694434789506	3	36165
code/registerFilesystem/vscode-userdata	1694434789506	0	36165
code/willInitWorkspaceService	1694434789507	1	36166
code/willInitStorage	1694434789508	1	36167
code/willInitUserConfiguration	1694434789512	4	36171
code/didInitStorage	1694434789520	8	36179
code/didInitUserConfiguration	1694434789523	3	36182
code/willInitWorkspaceConfiguration	1694434789523	0	36182
code/didInitWorkspaceConfiguration	1694434789527	4	36186
code/didInitWorkspaceService	1694434789527	0	36186
code/willStartWorkbench	1694434789529	2	36188
code/LifecyclePhase/Ready	1694434789530	1	36189
code/willCreateWorkbenchContributions/1	1694434789562	32	36221
code/didCreateWorkbenchContributions/1	1694434789568	6	36227
code/willCreateWorkbenchContributions/2	1694434789568	0	36227
code/registerFilesystem/trustedDomains	1694434789570	2	36229
code/registerFilesystem/vscode-local-history	1694434789573	3	36232
code/didCreateWorkbenchContributions/2	1694434789574	1	36233
code/willCreatePart/workbench.parts.titlebar	1694434789590	16	36249
code/didCreatePart/workbench.parts.titlebar	1694434789602	12	36261
code/willCreatePart/workbench.parts.banner	1694434789602	0	36261
code/didCreatePart/workbench.parts.banner	1694434789602	0	36261
code/willCreatePart/workbench.parts.activitybar	1694434789602	0	36261
code/didCreatePart/workbench.parts.activitybar	1694434789604	2	36263
code/willCreatePart/workbench.parts.sidebar	1694434789604	0	36263
code/didCreatePart/workbench.parts.sidebar	1694434789605	1	36264
code/willCreatePart/workbench.parts.editor	1694434789605	0	36264
code/didCreatePart/workbench.parts.editor	1694434789623	18	36282
code/willCreatePart/workbench.parts.panel	1694434789623	0	36282
code/didCreatePart/workbench.parts.panel	1694434789624	1	36283
code/willCreatePart/workbench.parts.auxiliarybar	1694434789624	0	36283
code/didCreatePart/workbench.parts.auxiliarybar	1694434789624	0	36283
code/willCreatePart/workbench.parts.statusbar	1694434789624	0	36283
code/didCreatePart/workbench.parts.statusbar	1694434789625	1	36284
code/didRemovePartsSplash	1694434789642	17	36301
code/willRestoreEditors	1694434789642	0	36301
code/restoreEditors/editorGroupsReady	1694434789654	12	36313
code/willRestoreViewlet	1694434789654	0	36313
code/restoreEditors/editorsToOpenResolved	1694434789662	8	36321
code/didRestoreViewlet	1694434789662	0	36321
code/willRegisterExplorerViews	1694434789662	0	36321
code/willResolveExplorer	1694434789677	15	36336
code/didRegisterExplorerViews	1694434789678	1	36337
code/restoreEditors/editorGroupsRestored	1694434789680	2	36339
code/didRestoreEditors	1694434789680	0	36339
code/didStartWorkbench	1694434789680	0	36339
code/LifecyclePhase/Restored	1694434789680	0	36339
code/willCreateWorkbenchContributions/3	1694434789680	0	36339
code/willConnectSharedProcess	1694434789680	0	36339
code/willLoadExtensions	1694434789729	49	36388
code/didResolveExplorer	1694434789754	25	36413
code/willHandleExtensionPoints	1694434789806	52	36465
code/willHandleExtensionPoint/configurationDefaults	1694434789806	0	36465
code/didHandleExtensionPoint/configurationDefaults	1694434789807	1	36466
code/willHandleExtensionPoint/configuration	1694434789807	0	36466
code/didHandleExtensionPoint/configuration	1694434789821	14	36480
code/willHandleExtensionPoint/jsonValidation	1694434789821	0	36480
code/didHandleExtensionPoint/jsonValidation	1694434789822	1	36481
code/willHandleExtensionPoint/debuggers	1694434789822	0	36481
code/didHandleExtensionPoint/debuggers	1694434789822	0	36481
code/willHandleExtensionPoint/breakpoints	1694434789822	0	36481
code/didHandleExtensionPoint/breakpoints	1694434789822	0	36481
code/willHandleExtensionPoint/notebooks	1694434789822	0	36481
code/didHandleExtensionPoint/notebooks	1694434789822	0	36481
code/willHandleExtensionPoint/notebookRenderer	1694434789822	0	36481
code/didHandleExtensionPoint/notebookRenderer	1694434789823	1	36482
code/willHandleExtensionPoint/notebookPreload	1694434789823	0	36482
code/didHandleExtensionPoint/notebookPreload	1694434789823	0	36482
code/willHandleExtensionPoint/problemPatterns	1694434789823	0	36482
code/didHandleExtensionPoint/problemPatterns	1694434789823	0	36482
code/willHandleExtensionPoint/problemMatchers	1694434789823	0	36482
code/didHandleExtensionPoint/problemMatchers	1694434789824	1	36483
code/willHandleExtensionPoint/taskDefinitions	1694434789824	0	36483
code/didHandleExtensionPoint/taskDefinitions	1694434789825	1	36484
code/willHandleExtensionPoint/terminal	1694434789825	0	36484
code/didHandleExtensionPoint/terminal	1694434789825	0	36484
code/willHandleExtensionPoint/terminalQuickFixes	1694434789825	0	36484
code/didHandleExtensionPoint/terminalQuickFixes	1694434789825	0	36484
code/willHandleExtensionPoint/walkthroughs	1694434789825	0	36484
code/didHandleExtensionPoint/walkthroughs	1694434789825	0	36484
code/willHandleExtensionPoint/commands	1694434789825	0	36484
code/didHandleExtensionPoint/commands	1694434789829	4	36488
code/willHandleExtensionPoint/submenus	1694434789829	0	36488
code/didHandleExtensionPoint/submenus	1694434789829	0	36488
code/willHandleExtensionPoint/menus	1694434789829	0	36488
code/didHandleExtensionPoint/menus	1694434789841	12	36500
code/willHandleExtensionPoint/authentication	1694434789841	0	36500
code/didHandleExtensionPoint/authentication	1694434789841	0	36500
code/willHandleExtensionPoint/languages	1694434789841	0	36500
code/didHandleExtensionPoint/languages	1694434789846	5	36505
code/willHandleExtensionPoint/customEditors	1694434789846	0	36505
code/didHandleExtensionPoint/customEditors	1694434789846	0	36505
code/willHandleExtensionPoint/codeActions	1694434789846	0	36505
code/didHandleExtensionPoint/codeActions	1694434789846	0	36505
code/willHandleExtensionPoint/viewsWelcome	1694434789846	0	36505
code/didHandleExtensionPoint/viewsWelcome	1694434789846	0	36505
code/willHandleExtensionPoint/resourceLabelFormatters	1694434789846	0	36505
code/didHandleExtensionPoint/resourceLabelFormatters	1694434789846	0	36505
code/willHandleExtensionPoint/grammars	1694434789846	0	36505
code/didHandleExtensionPoint/grammars	1694434789847	1	36506
code/willHandleExtensionPoint/colors	1694434789847	0	36506
code/didHandleExtensionPoint/colors	1694434789847	0	36506
code/willHandleExtensionPoint/icons	1694434789847	0	36506
code/didHandleExtensionPoint/icons	1694434789848	1	36507
code/willHandleExtensionPoint/semanticTokenTypes	1694434789848	0	36507
code/didHandleExtensionPoint/semanticTokenTypes	1694434789848	0	36507
code/willHandleExtensionPoint/semanticTokenModifiers	1694434789848	0	36507
code/didHandleExtensionPoint/semanticTokenModifiers	1694434789848	0	36507
code/willHandleExtensionPoint/semanticTokenScopes	1694434789848	0	36507
code/didHandleExtensionPoint/semanticTokenScopes	1694434789848	0	36507
code/willHandleExtensionPoint/themes	1694434789848	0	36507
code/didHandleExtensionPoint/themes	1694434789849	1	36508
code/willHandleExtensionPoint/iconThemes	1694434789849	0	36508
code/didHandleExtensionPoint/iconThemes	1694434789849	0	36508
code/willHandleExtensionPoint/snippets	1694434789849	0	36508
code/didHandleExtensionPoint/snippets	1694434789849	0	36508
code/willHandleExtensionPoint/keybindings	1694434789849	0	36508
code/didHandleExtensionPoint/keybindings	1694434789854	5	36513
code/willHandleExtensionPoint/viewsContainers	1694434789854	0	36513
code/didHandleExtensionPoint/viewsContainers	1694434789864	10	36523
code/willHandleExtensionPoint/views	1694434789864	0	36523
code/didHandleExtensionPoint/views	1694434789871	7	36530
code/willHandleExtensionPoint/remoteHelp	1694434789871	0	36530
code/didHandleExtensionPoint/remoteHelp	1694434789871	0	36530
code/willHandleExtensionPoint/continueEditSession	1694434789871	0	36530
code/didHandleExtensionPoint/continueEditSession	1694434789871	0	36530
code/didHandleExtensionPoints	1694434789871	0	36530
code/didLoadExtensions	1694434789874	3	36533
code/didConnectSharedProcess	1694434789923	49	36582
code/terminal/willGetTerminalBackend	1694434789966	43	36625
code/terminal/didGetTerminalBackend	1694434789966	0	36625
code/terminal/willReconnect	1694434789966	0	36625
code/terminal/willGetTerminalLayoutInfo	1694434789966	0	36625
code/terminal/didGetTerminalLayoutInfo	1694434789968	2	36627
code/terminal/didReconnect	1694434789968	0	36627
code/terminal/willReplay	1694434789968	0	36627
code/terminal/didReplay	1694434789968	0	36627
code/terminal/willGetPerformanceMarks	1694434789968	0	36627
code/terminal/didGetPerformanceMarks	1694434789972	4	36631
```

## Loader Stats

### Load AMD-module

| Module                                                                                                              | Duration           |
| ------------------------------------------------------------------------------------------------------------------- | ------------------ |
| vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js                    | 388.8000000002794  |
| vscode-file://vscode-app/usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.nls.js                | 15.600000000093132 |
| vscode-file://vscode-app/usr/share/code/resources/app/out/../node_modules.asar/tas-client-umd/lib/tas-client-umd.js | 167                |
| vscode-file://vscode-app/usr/share/code/resources/app/out/../node_modules.asar/vscode-textmate/release/main.js      | -50550.5           |
| vscode-file://vscode-app/usr/share/code/resources/app/out/../node_modules.asar/vscode-oniguruma/release/main.js     | -50550.90000000037 |

### Load commonjs-module

| Module | Duration |
| ------ | -------- |

### Invoke AMD-module factory
(see attached file as this data made the comment much too long for github to accept)
[vscode-amd-module-factory.txt](https://github.com/microsoft/vscode/files/12576000/vscode-amd-module-factory.txt)


### Invoke commonjs-module

| Module | Duration |
| ------ | -------- |

## Node Cached Data Stats


### cached data used


### cached data missed


### cached data rejected


### cached data created (lazy, might need refreshes)



## Resource Timing Stats

| Name                                                                     | Duration           |
| ------------------------------------------------------------------------ | ------------------ |
| https://default.exp-tas.com/vscode/ab                                    | 439.10000000009313 |
| https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery | 609.9000000003725  |
| https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery | 1366.1000000000931 |



[prof-hzsgjWke.main.cpuprofile.txt](https://github.com/microsoft/vscode/files/12575918/prof-hzsgjWke.main.cpuprofile.txt)
[prof-hzsgjWke.renderer.cpuprofile.txt](https://github.com/microsoft/vscode/files/12575919/prof-hzsgjWke.renderer.cpuprofile.txt)