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

Slow startup time on 1.82.0 #192493

Open
x-hgg-x opened this issue Sep 7, 2023 · 52 comments
Open

Slow startup time on 1.82.0 #192493

x-hgg-x opened this issue Sep 7, 2023 · 52 comments
Assignees
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues linux Issues with VS Code on Linux under-discussion Issue is under discussion for relevance, priority, approach

Comments

@x-hgg-x
Copy link

x-hgg-x commented Sep 7, 2023

With all extensions disabled, VS Code 1.82.0 takes 4x more time to start than VS Code 1.81.1, due to a slow renderer :

1.81.1

System Info

  • Code: 1.81.1 (6c3e3db)
  • OS: linux(6.0.19-060019-generic)
  • CPUs: 12th Gen Intel(R) Core(TM) i9-12900HK(20 x 4103)
  • Memory(System): 31.01 GB(22.52GB free)
  • Memory(Process): 185.98 MB working set(104.07MB private, 0.11MB 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 94 [main] initial startup: true
nls:start => nls:end 2 [main] initial startup: true
require(main.bundle.js) 64 [main] initial startup: true
start crash reporter 3 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 29 [main] initial startup: true, state: 0ms, widget: 28ms, show: 0ms
app.isReady => window.loadUrl() 114 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 320 [main->renderer] NewWindow
require(workbench.desktop.main.js) 385 [renderer] cached data: NO, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 27 [renderer] -
init workspace service 16 [renderer] -
register extensions & spawn extension host 71 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 3 [renderer] 0:
overall workbench load 84 [renderer] -
workbench ready 1031 [main->renderer] -
renderer ready 505 [renderer] -
shared process connection ready 161 [renderer->sharedprocess] -
extensions registered 1150 [renderer] -

Raw Perf Marks: renderer

Name	Timestamp	Delta	Total
code/timeOrigin	1694119745894	0	0
code/didStartRenderer	1694119746211	317	317
code/willWaitForWindowConfig	1694119746211	0	317
code/didWaitForWindowConfig	1694119746212	1	318
code/willShowPartsSplash	1694119746212	0	318
code/didShowPartsSplash	1694119746213	1	319
code/willLoadWorkbenchMain	1694119746213	0	319
code/didLoadWorkbenchMain	1694119746598	385	704
code/registerFilesystem/file	1694119746601	3	707
code/registerFilesystem/vscode-userdata	1694119746601	0	707
code/willInitWorkspaceService	1694119746602	1	708
code/willInitStorage	1694119746603	1	709
code/willInitUserConfiguration	1694119746606	3	712
code/didInitUserConfiguration	1694119746617	11	723
code/willInitWorkspaceConfiguration	1694119746617	0	723
code/didInitWorkspaceConfiguration	1694119746618	1	724
code/didInitWorkspaceService	1694119746618	0	724
code/didInitStorage	1694119746630	12	736
code/willStartWorkbench	1694119746632	2	738
code/LifecyclePhase/Ready	1694119746633	1	739
code/willCreateWorkbenchContributions/1	1694119746652	19	758
code/didCreateWorkbenchContributions/1	1694119746672	20	778
code/willCreateWorkbenchContributions/2	1694119746672	0	778
code/registerFilesystem/trustedDomains	1694119746674	2	780
code/registerFilesystem/vscode-local-history	1694119746677	3	783
code/didCreateWorkbenchContributions/2	1694119746678	1	784
code/willCreatePart/workbench.parts.titlebar	1694119746679	1	785
code/didCreatePart/workbench.parts.titlebar	1694119746683	4	789
code/willCreatePart/workbench.parts.banner	1694119746683	0	789
code/didCreatePart/workbench.parts.banner	1694119746683	0	789
code/willCreatePart/workbench.parts.activitybar	1694119746683	0	789
code/didCreatePart/workbench.parts.activitybar	1694119746685	2	791
code/willCreatePart/workbench.parts.sidebar	1694119746685	0	791
code/didCreatePart/workbench.parts.sidebar	1694119746686	1	792
code/willCreatePart/workbench.parts.editor	1694119746686	0	792
code/didCreatePart/workbench.parts.editor	1694119746702	16	808
code/willCreatePart/workbench.parts.panel	1694119746702	0	808
code/didCreatePart/workbench.parts.panel	1694119746703	1	809
code/willCreatePart/workbench.parts.auxiliarybar	1694119746703	0	809
code/didCreatePart/workbench.parts.auxiliarybar	1694119746704	1	810
code/willCreatePart/workbench.parts.statusbar	1694119746704	0	810
code/didCreatePart/workbench.parts.statusbar	1694119746705	1	811
code/didRemovePartsSplash	1694119746712	7	818
code/willRestoreEditors	1694119746713	1	819
code/restoreEditors/editorGroupsReady	1694119746714	1	820
code/restoreEditors/editorsToOpenResolved	1694119746715	1	821
code/willRegisterExplorerViews	1694119746715	0	821
code/didRegisterExplorerViews	1694119746715	0	821
code/restoreEditors/editorGroupsRestored	1694119746716	1	822
code/didRestoreEditors	1694119746716	0	822
code/didStartWorkbench	1694119746716	0	822
code/LifecyclePhase/Restored	1694119746716	0	822
code/willCreateWorkbenchContributions/3	1694119746716	0	822
code/willConnectSharedProcess	1694119746716	0	822
code/willLoadExtensions	1694119746764	48	870
code/willHandleExtensionPoints	1694119746800	36	906
code/willHandleExtensionPoint/configurationDefaults	1694119746800	0	906
code/didHandleExtensionPoint/configurationDefaults	1694119746800	0	906
code/willHandleExtensionPoint/configuration	1694119746800	0	906
code/didHandleExtensionPoint/configuration	1694119746811	11	917
code/willHandleExtensionPoint/jsonValidation	1694119746811	0	917
code/didHandleExtensionPoint/jsonValidation	1694119746811	0	917
code/willHandleExtensionPoint/debuggers	1694119746811	0	917
code/didHandleExtensionPoint/debuggers	1694119746811	0	917
code/willHandleExtensionPoint/breakpoints	1694119746811	0	917
code/didHandleExtensionPoint/breakpoints	1694119746811	0	917
code/willHandleExtensionPoint/notebooks	1694119746811	0	917
code/didHandleExtensionPoint/notebooks	1694119746812	1	918
code/willHandleExtensionPoint/notebookRenderer	1694119746812	0	918
code/didHandleExtensionPoint/notebookRenderer	1694119746813	1	919
code/willHandleExtensionPoint/problemPatterns	1694119746813	0	919
code/didHandleExtensionPoint/problemPatterns	1694119746813	0	919
code/willHandleExtensionPoint/problemMatchers	1694119746813	0	919
code/didHandleExtensionPoint/problemMatchers	1694119746814	1	920
code/willHandleExtensionPoint/taskDefinitions	1694119746814	0	920
code/didHandleExtensionPoint/taskDefinitions	1694119746814	0	920
code/willHandleExtensionPoint/terminal	1694119746814	0	920
code/didHandleExtensionPoint/terminal	1694119746814	0	920
code/willHandleExtensionPoint/terminalQuickFixes	1694119746814	0	920
code/didHandleExtensionPoint/terminalQuickFixes	1694119746814	0	920
code/willHandleExtensionPoint/commands	1694119746814	0	920
code/didHandleExtensionPoint/commands	1694119746816	2	922
code/willHandleExtensionPoint/submenus	1694119746816	0	922
code/didHandleExtensionPoint/submenus	1694119746816	0	922
code/willHandleExtensionPoint/menus	1694119746816	0	922
code/didHandleExtensionPoint/menus	1694119746821	5	927
code/willHandleExtensionPoint/authentication	1694119746821	0	927
code/didHandleExtensionPoint/authentication	1694119746821	0	927
code/willHandleExtensionPoint/languages	1694119746821	0	927
code/didHandleExtensionPoint/languages	1694119746824	3	930
code/willHandleExtensionPoint/customEditors	1694119746824	0	930
code/didHandleExtensionPoint/customEditors	1694119746824	0	930
code/willHandleExtensionPoint/codeActions	1694119746824	0	930
code/didHandleExtensionPoint/codeActions	1694119746824	0	930
code/willHandleExtensionPoint/viewsWelcome	1694119746824	0	930
code/didHandleExtensionPoint/viewsWelcome	1694119746824	0	930
code/willHandleExtensionPoint/grammars	1694119746824	0	930
code/didHandleExtensionPoint/grammars	1694119746826	2	932
code/willHandleExtensionPoint/colors	1694119746826	0	932
code/didHandleExtensionPoint/colors	1694119746826	0	932
code/willHandleExtensionPoint/semanticTokenScopes	1694119746826	0	932
code/didHandleExtensionPoint/semanticTokenScopes	1694119746826	0	932
code/willHandleExtensionPoint/themes	1694119746826	0	932
code/didHandleExtensionPoint/themes	1694119746827	1	933
code/willHandleExtensionPoint/iconThemes	1694119746827	0	933
code/didHandleExtensionPoint/iconThemes	1694119746827	0	933
code/willHandleExtensionPoint/snippets	1694119746827	0	933
code/didHandleExtensionPoint/snippets	1694119746827	0	933
code/willHandleExtensionPoint/keybindings	1694119746827	0	933
code/didHandleExtensionPoint/keybindings	1694119746830	3	936
code/willHandleExtensionPoint/viewsContainers	1694119746830	0	936
code/didHandleExtensionPoint/viewsContainers	1694119746832	2	938
code/willHandleExtensionPoint/views	1694119746832	0	938
code/didHandleExtensionPoint/views	1694119746833	1	939
code/willHandleExtensionPoint/continueEditSession	1694119746833	0	939
code/didHandleExtensionPoint/continueEditSession	1694119746833	0	939
code/didHandleExtensionPoints	1694119746833	0	939
code/didLoadExtensions	1694119746835	2	941
code/didConnectSharedProcess	1694119746877	42	983
code/terminal/willGetTerminalBackend	1694119746900	23	1006
code/terminal/didGetTerminalBackend	1694119746900	0	1006
code/terminal/willReconnect	1694119746900	0	1006
code/terminal/willGetTerminalLayoutInfo	1694119746900	0	1006
code/terminal/didGetTerminalLayoutInfo	1694119746903	3	1009
code/terminal/didReconnect	1694119746903	0	1009
code/terminal/willReplay	1694119746903	0	1009
code/terminal/didReplay	1694119746903	0	1009
code/terminal/willGetPerformanceMarks	1694119746903	0	1009
code/terminal/didGetPerformanceMarks	1694119746919	16	1025
1.82.0

System Info

  • Code: 1.82.0 (8b617bd)
  • OS: linux(6.0.19-060019-generic)
  • CPUs: 12th Gen Intel(R) Core(TM) i9-12900HK(20 x 4220)
  • Memory(System): 31.01 GB(22.78GB free)
  • Memory(Process): 184.13 MB working set(101.13MB private, 0.86MB 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 60 [main] initial startup: true
nls:start => nls:end 3 [main] initial startup: true
require(main.bundle.js) 58 [main] initial startup: true
start crash reporter 3 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 25 [main] initial startup: true, state: 0ms, widget: 23ms, show: 0ms
app.isReady => window.loadUrl() 104 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 2619 [main->renderer] NewWindow
require(workbench.desktop.main.js) 365 [renderer] cached data: NO, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 1034 [renderer] -
init workspace service 1015 [renderer] -
register extensions & spawn extension host 83 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 3 [renderer] 0:
overall workbench load 77 [renderer] -
workbench ready 4267 [main->renderer] -
renderer ready 1488 [renderer] -
shared process connection ready 150 [renderer->sharedprocess] -
extensions registered 4398 [renderer] -

Raw Perf Marks: renderer

Name	Timestamp	Delta	Total
code/timeOrigin	1694119538034	0	0
code/didStartRenderer	1694119540648	2614	2614
code/willWaitForWindowConfig	1694119540649	1	2615
code/didWaitForWindowConfig	1694119540650	1	2616
code/willShowPartsSplash	1694119540651	1	2617
code/didShowPartsSplash	1694119540651	0	2617
code/willLoadWorkbenchMain	1694119540652	1	2618
code/didLoadWorkbenchMain	1694119541017	365	2983
code/registerFilesystem/file	1694119541019	2	2985
code/registerFilesystem/vscode-userdata	1694119541020	1	2986
code/willInitWorkspaceService	1694119541021	1	2987
code/willInitStorage	1694119541021	0	2987
code/willInitUserConfiguration	1694119542017	996	3983
code/didInitUserConfiguration	1694119542035	18	4001
code/willInitWorkspaceConfiguration	1694119542035	0	4001
code/didInitWorkspaceConfiguration	1694119542036	1	4002
code/didInitWorkspaceService	1694119542036	0	4002
code/didInitStorage	1694119542055	19	4021
code/willStartWorkbench	1694119542059	4	4025
code/LifecyclePhase/Ready	1694119542060	1	4026
code/willCreateWorkbenchContributions/1	1694119542089	29	4055
code/didCreateWorkbenchContributions/1	1694119542095	6	4061
code/willCreateWorkbenchContributions/2	1694119542095	0	4061
code/registerFilesystem/trustedDomains	1694119542097	2	4063
code/registerFilesystem/vscode-local-history	1694119542099	2	4065
code/didCreateWorkbenchContributions/2	1694119542100	1	4066
code/willCreatePart/workbench.parts.titlebar	1694119542102	2	4068
code/didCreatePart/workbench.parts.titlebar	1694119542113	11	4079
code/willCreatePart/workbench.parts.banner	1694119542113	0	4079
code/didCreatePart/workbench.parts.banner	1694119542113	0	4079
code/willCreatePart/workbench.parts.activitybar	1694119542113	0	4079
code/didCreatePart/workbench.parts.activitybar	1694119542115	2	4081
code/willCreatePart/workbench.parts.sidebar	1694119542115	0	4081
code/didCreatePart/workbench.parts.sidebar	1694119542116	1	4082
code/willCreatePart/workbench.parts.editor	1694119542116	0	4082
code/didCreatePart/workbench.parts.editor	1694119542123	7	4089
code/willCreatePart/workbench.parts.panel	1694119542123	0	4089
code/didCreatePart/workbench.parts.panel	1694119542124	1	4090
code/willCreatePart/workbench.parts.auxiliarybar	1694119542124	0	4090
code/didCreatePart/workbench.parts.auxiliarybar	1694119542124	0	4090
code/willCreatePart/workbench.parts.statusbar	1694119542124	0	4090
code/didCreatePart/workbench.parts.statusbar	1694119542125	1	4091
code/didRemovePartsSplash	1694119542132	7	4098
code/willRestoreEditors	1694119542133	1	4099
code/restoreEditors/editorGroupsReady	1694119542134	1	4100
code/restoreEditors/editorsToOpenResolved	1694119542135	1	4101
code/willRegisterExplorerViews	1694119542135	0	4101
code/didRegisterExplorerViews	1694119542135	0	4101
code/restoreEditors/editorGroupsRestored	1694119542136	1	4102
code/didRestoreEditors	1694119542136	0	4102
code/didStartWorkbench	1694119542136	0	4102
code/LifecyclePhase/Restored	1694119542136	0	4102
code/willCreateWorkbenchContributions/3	1694119542136	0	4102
code/willConnectSharedProcess	1694119542136	0	4102
code/willLoadExtensions	1694119542184	48	4150
code/willHandleExtensionPoints	1694119542237	53	4203
code/willHandleExtensionPoint/configurationDefaults	1694119542238	1	4204
code/didHandleExtensionPoint/configurationDefaults	1694119542238	0	4204
code/willHandleExtensionPoint/configuration	1694119542238	0	4204
code/didHandleExtensionPoint/configuration	1694119542245	7	4211
code/willHandleExtensionPoint/jsonValidation	1694119542245	0	4211
code/didHandleExtensionPoint/jsonValidation	1694119542246	1	4212
code/willHandleExtensionPoint/debuggers	1694119542246	0	4212
code/didHandleExtensionPoint/debuggers	1694119542246	0	4212
code/willHandleExtensionPoint/breakpoints	1694119542246	0	4212
code/didHandleExtensionPoint/breakpoints	1694119542246	0	4212
code/willHandleExtensionPoint/notebooks	1694119542246	0	4212
code/didHandleExtensionPoint/notebooks	1694119542246	0	4212
code/willHandleExtensionPoint/notebookRenderer	1694119542246	0	4212
code/didHandleExtensionPoint/notebookRenderer	1694119542247	1	4213
code/willHandleExtensionPoint/problemPatterns	1694119542247	0	4213
code/didHandleExtensionPoint/problemPatterns	1694119542248	1	4214
code/willHandleExtensionPoint/problemMatchers	1694119542248	0	4214
code/didHandleExtensionPoint/problemMatchers	1694119542248	0	4214
code/willHandleExtensionPoint/taskDefinitions	1694119542248	0	4214
code/didHandleExtensionPoint/taskDefinitions	1694119542249	1	4215
code/willHandleExtensionPoint/terminal	1694119542249	0	4215
code/didHandleExtensionPoint/terminal	1694119542249	0	4215
code/willHandleExtensionPoint/terminalQuickFixes	1694119542249	0	4215
code/didHandleExtensionPoint/terminalQuickFixes	1694119542249	0	4215
code/willHandleExtensionPoint/commands	1694119542249	0	4215
code/didHandleExtensionPoint/commands	1694119542250	1	4216
code/willHandleExtensionPoint/submenus	1694119542250	0	4216
code/didHandleExtensionPoint/submenus	1694119542250	0	4216
code/willHandleExtensionPoint/menus	1694119542250	0	4216
code/didHandleExtensionPoint/menus	1694119542253	3	4219
code/willHandleExtensionPoint/authentication	1694119542253	0	4219
code/didHandleExtensionPoint/authentication	1694119542253	0	4219
code/willHandleExtensionPoint/languages	1694119542253	0	4219
code/didHandleExtensionPoint/languages	1694119542255	2	4221
code/willHandleExtensionPoint/customEditors	1694119542255	0	4221
code/didHandleExtensionPoint/customEditors	1694119542255	0	4221
code/willHandleExtensionPoint/codeActions	1694119542255	0	4221
code/didHandleExtensionPoint/codeActions	1694119542255	0	4221
code/willHandleExtensionPoint/viewsWelcome	1694119542255	0	4221
code/didHandleExtensionPoint/viewsWelcome	1694119542255	0	4221
code/willHandleExtensionPoint/grammars	1694119542255	0	4221
code/didHandleExtensionPoint/grammars	1694119542256	1	4222
code/willHandleExtensionPoint/colors	1694119542256	0	4222
code/didHandleExtensionPoint/colors	1694119542257	1	4223
code/willHandleExtensionPoint/semanticTokenScopes	1694119542257	0	4223
code/didHandleExtensionPoint/semanticTokenScopes	1694119542257	0	4223
code/willHandleExtensionPoint/themes	1694119542257	0	4223
code/didHandleExtensionPoint/themes	1694119542257	0	4223
code/willHandleExtensionPoint/iconThemes	1694119542257	0	4223
code/didHandleExtensionPoint/iconThemes	1694119542257	0	4223
code/willHandleExtensionPoint/snippets	1694119542257	0	4223
code/didHandleExtensionPoint/snippets	1694119542257	0	4223
code/willHandleExtensionPoint/keybindings	1694119542257	0	4223
code/didHandleExtensionPoint/keybindings	1694119542261	4	4227
code/willHandleExtensionPoint/viewsContainers	1694119542261	0	4227
code/didHandleExtensionPoint/viewsContainers	1694119542263	2	4229
code/willHandleExtensionPoint/views	1694119542263	0	4229
code/didHandleExtensionPoint/views	1694119542264	1	4230
code/willHandleExtensionPoint/continueEditSession	1694119542264	0	4230
code/didHandleExtensionPoint/continueEditSession	1694119542264	0	4230
code/didHandleExtensionPoints	1694119542264	0	4230
code/didLoadExtensions	1694119542267	3	4233
code/didConnectSharedProcess	1694119542286	19	4252
code/terminal/willGetTerminalBackend	1694119542301	15	4267
code/terminal/didGetTerminalBackend	1694119542301	0	4267
code/terminal/willReconnect	1694119542301	0	4267
code/terminal/willGetTerminalLayoutInfo	1694119542301	0	4267
code/terminal/didGetTerminalLayoutInfo	1694119542303	2	4269
code/terminal/didReconnect	1694119542303	0	4269
code/terminal/willReplay	1694119542303	0	4269
code/terminal/didReplay	1694119542303	0	4269
code/terminal/willGetPerformanceMarks	1694119542303	0	4269
code/terminal/didGetPerformanceMarks	1694119542305	2	4271

Detailed profiles :
profile 1.81.1.tar.gz
profile 1.82.0.tar.gz

OS : Linux Mint 21.2 Victoria

@benibenj benibenj assigned bpasero and unassigned benibenj Sep 8, 2023
@bpasero bpasero added the freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues label Sep 8, 2023
@bpasero
Copy link
Member

bpasero commented Sep 8, 2023

Thanks for providing very good context 👏

Some ideas: does it reproduce when you run code --disable-gpu from the command line?

@bpasero bpasero added info-needed Issue requires more information from poster linux Issues with VS Code on Linux labels Sep 8, 2023
@iAweX
Copy link

iAweX commented Sep 8, 2023

Same issue with version 1.82 on Debian 12.

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 8, 2023

Some ideas: does it reproduce when you run code --disable-gpu from the command line?

Yes, it reproduces :
profile 1.82.0 disable-gpu.tar.gz

I also noted that the two steps init storage (global & workspace) and init workspace service are not always slow (more than 1s).

@bpasero
Copy link
Member

bpasero commented Sep 8, 2023

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

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 8, 2023

I have the same problem with an insider build :
profile insiders disable-gpu.tar.gz

@bpasero
Copy link
Member

bpasero commented Sep 8, 2023

How about code --no-sandbox?

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 8, 2023

Same results :
profile insiders disable-gpu no-sandbox.tar.gz

@deepak1556
Copy link
Collaborator

deepak1556 commented Sep 11, 2023

GIven most of the slowdown is in window.loadUrl() => begin to require(workbench.desktop.main.js) we need to check the runtime trace to understand the issue better,

@x-hgg-x can you perform the following steps to help us get a runtime trace,

  1. Closing all running instances of VSCode
  2. Start a new instance with the following arguments code --trace --trace-category-filter="base,benchmark,browser,blink,blink.net,blink.resource,evdev,gpu,ipc,latency,mojom,navigation,navigation.debug,renderer,renderer_host,shell,startup,toplevel,v8,disabled-by-default-base,disabled-by-default-cpu_profiler,disabled-by-default-blink.debug,disabled-by-default-mojom"
  3. Once the editor is fully loaded, open command palette and run Developer: Stop Tracing, this will generate a trace and provide you the path at which the trace was saved. Attach it to this issue thread.

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 11, 2023

Here is the trace :
code-insiders-tvZoeJ2Q.trace.txt.tar.gz

Curiously the performance marks have now changed :

Show
What Duration Process Info
start => app.isReady 72 [main] initial startup: true
nls:start => nls:end 2 [main] initial startup: true
require(main.bundle.js) 33 [main] initial startup: true
start crash reporter 9 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 20 [main] initial startup: true, state: 0ms, widget: 20ms, show: 0ms
app.isReady => window.loadUrl() 66 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 39 [main->renderer] NewWindow
require(workbench.desktop.main.js) 109 [renderer] cached data: YES, node_modules took 0ms
wait for window config 2 [renderer] -
init storage (global & workspace) 3874 [renderer] -
init workspace service 3876 [renderer] -
register extensions & spawn extension host 85 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 3 [renderer] 0:
overall workbench load 70 [renderer] -
workbench ready 4235 [main->renderer] -
renderer ready 4061 [renderer] -
shared process connection ready 114 [renderer->sharedprocess] -
extensions registered 4368 [renderer] -

@deepak1556
Copy link
Collaborator

Can you do another run to see if the performance marks have consistently changed.

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 11, 2023

Results on successive launchs using code-insiders --disable-gpu --no-sandbox :

1st launch with an empty `data` folder
What Duration Process Info
start => app.isReady 67 [main] initial startup: true
nls:start => nls:end 2 [main] initial startup: true
require(main.bundle.js) 52 [main] initial startup: true
start crash reporter 0 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 24 [main] initial startup: true, state: 0ms, widget: 23ms, show: 0ms
app.isReady => window.loadUrl() 100 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 34 [main->renderer] NewWindow
require(workbench.desktop.main.js) 2421 [renderer] cached data: NO, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 70 [renderer] -
init workspace service 72 [renderer] -
register extensions & spawn extension host 278 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 2 [renderer] 1: workbench.editors.gettingStartedInput
overall workbench load 80 [renderer] -
workbench ready 2779 [main->renderer] -
renderer ready 2580 [renderer] -
shared process connection ready 161 [renderer->sharedprocess] -
extensions registered 3097 [renderer] -
2nd launch
What Duration Process Info
start => app.isReady 82 [main] initial startup: true
nls:start => nls:end 3 [main] initial startup: true
require(main.bundle.js) 35 [main] initial startup: true
start crash reporter 9 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 23 [main] initial startup: true, state: 0ms, widget: 22ms, show: 0ms
app.isReady => window.loadUrl() 71 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 36 [main->renderer] NewWindow
require(workbench.desktop.main.js) 111 [renderer] cached data: YES, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 3880 [renderer] -
init workspace service 3882 [renderer] -
register extensions & spawn extension host 115 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 2 [renderer] 1: workbench.editors.gettingStartedInput
overall workbench load 71 [renderer] -
workbench ready 4256 [main->renderer] -
renderer ready 4069 [renderer] -
shared process connection ready 124 [renderer->sharedprocess] -
extensions registered 4420 [renderer] -
3rd launch
What Duration Process Info
start => app.isReady 82 [main] initial startup: true
nls:start => nls:end 3 [main] initial startup: true
require(main.bundle.js) 34 [main] initial startup: true
start crash reporter 3 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 23 [main] initial startup: true, state: 0ms, widget: 22ms, show: 0ms
app.isReady => window.loadUrl() 72 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 35 [main->renderer] NewWindow
require(workbench.desktop.main.js) 112 [renderer] cached data: YES, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 2162 [renderer] -
init workspace service 2149 [renderer] -
register extensions & spawn extension host 59 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 3 [renderer] 0:
overall workbench load 75 [renderer] -
workbench ready 2542 [main->renderer] -
renderer ready 2354 [renderer] -
shared process connection ready 164 [renderer->sharedprocess] -
extensions registered 2661 [renderer] -
4th launch
What Duration Process Info
start => app.isReady 76 [main] initial startup: true
nls:start => nls:end 5 [main] initial startup: true
require(main.bundle.js) 36 [main] initial startup: true
start crash reporter 2 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 25 [main] initial startup: true, state: 0ms, widget: 25ms, show: 0ms
app.isReady => window.loadUrl() 77 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 32 [main->renderer] NewWindow
require(workbench.desktop.main.js) 113 [renderer] cached data: YES, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 3893 [renderer] -
init workspace service 3879 [renderer] -
register extensions & spawn extension host 84 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 3 [renderer] 0:
overall workbench load 71 [renderer] -
workbench ready 4265 [main->renderer] -
renderer ready 4081 [renderer] -
shared process connection ready 127 [renderer->sharedprocess] -
extensions registered 4399 [renderer] -
5th launch
What Duration Process Info
start => app.isReady 85 [main] initial startup: true
nls:start => nls:end 4 [main] initial startup: true
require(main.bundle.js) 32 [main] initial startup: true
start crash reporter 3 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 23 [main] initial startup: true, state: 0ms, widget: 23ms, show: 0ms
app.isReady => window.loadUrl() 71 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 34 [main->renderer] NewWindow
require(workbench.desktop.main.js) 109 [renderer] cached data: YES, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 2184 [renderer] -
init workspace service 2170 [renderer] -
register extensions & spawn extension host 96 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 2 [renderer] 0:
overall workbench load 71 [renderer] -
workbench ready 2558 [main->renderer] -
renderer ready 2370 [renderer] -
shared process connection ready 126 [renderer->sharedprocess] -
extensions registered 2693 [renderer] -
6th launch
What Duration Process Info
start => app.isReady 53 [main] initial startup: true
nls:start => nls:end 3 [main] initial startup: true
require(main.bundle.js) 33 [main] initial startup: true
start crash reporter 1 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 23 [main] initial startup: true, state: 0ms, widget: 23ms, show: 0ms
app.isReady => window.loadUrl() 69 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 34 [main->renderer] NewWindow
require(workbench.desktop.main.js) 112 [renderer] cached data: YES, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 3891 [renderer] -
init workspace service 3872 [renderer] -
register extensions & spawn extension host 77 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 3 [renderer] 0:
overall workbench load 71 [renderer] -
workbench ready 4233 [main->renderer] -
renderer ready 4078 [renderer] -
shared process connection ready 133 [renderer->sharedprocess] -
extensions registered 4358 [renderer] -

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 11, 2023

Using code-insiders --disable-gpu --no-sandbox --prof-startup, I have the following results which alternate :

Result 1 (50% of time)
What Duration Process Info
start => app.isReady 64 [main] initial startup: true
nls:start => nls:end 3 [main] initial startup: true
require(main.bundle.js) 58 [main] initial startup: true
start crash reporter 2 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 23 [main] initial startup: true, state: 0ms, widget: 23ms, show: 0ms
app.isReady => window.loadUrl() 104 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 40 [main->renderer] NewWindow
require(workbench.desktop.main.js) 2450 [renderer] cached data: NO, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 1509 [renderer] -
init workspace service 1495 [renderer] -
register extensions & spawn extension host 86 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 35 [renderer] 0:
overall workbench load 123 [renderer] -
workbench ready 4297 [main->renderer] -
renderer ready 4091 [renderer] -
shared process connection ready 0 [renderer->sharedprocess] -
extensions registered 4441 [renderer] -
Result 2 (50% of time)
What Duration Process Info
start => app.isReady 59 [main] initial startup: true
nls:start => nls:end 8 [main] initial startup: true
require(main.bundle.js) 63 [main] initial startup: true
start crash reporter 2 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 25 [main] initial startup: true, state: 0ms, widget: 24ms, show: 0ms
app.isReady => window.loadUrl() 117 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 49 [main->renderer] NewWindow
require(workbench.desktop.main.js) 2435 [renderer] cached data: NO, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 16 [renderer] -
init workspace service 16 [renderer] -
register extensions & spawn extension host 55 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 2 [renderer] 0:
overall workbench load 82 [renderer] -
workbench ready 2765 [main->renderer] -
renderer ready 2542 [renderer] -
shared process connection ready 0 [renderer->sharedprocess] -
extensions registered 2869 [renderer] -

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 11, 2023

Here is the trace corresponding to the 2nd launch :
code-insiders-6lednKqD.trace.txt.tar.gz

Associated performance marks
What Duration Process Info
start => app.isReady 2389 [main] initial startup: true
nls:start => nls:end 1 [main] initial startup: true
require(main.bundle.js) 51 [main] initial startup: true
start crash reporter 9 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 26 [main] initial startup: true, state: 1ms, widget: 24ms, show: 0ms
app.isReady => window.loadUrl() 94 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 46 [main->renderer] NewWindow
require(workbench.desktop.main.js) 113 [renderer] cached data: YES, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 3858 [renderer] -
init workspace service 3843 [renderer] -
register extensions & spawn extension host 216 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 30 [renderer] 1: workbench.editors.gettingStartedInput
overall workbench load 148 [renderer] -
workbench ready 6651 [main->renderer] -
renderer ready 4123 [renderer] -
shared process connection ready 256 [renderer->sharedprocess] -
extensions registered 6941 [renderer] -

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 11, 2023

Here is the trace corresponding to the 1st launch, with an empty data folder :
code-insiders-CVYD0Hlx.trace.txt.tar.gz

Associated performance marks
What Duration Process Info
start => app.isReady 2429 [main] initial startup: true
nls:start => nls:end 1 [main] initial startup: true
require(main.bundle.js) 57 [main] initial startup: true
start crash reporter 0 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 26 [main] initial startup: true, state: 0ms, widget: 26ms, show: 0ms
app.isReady => window.loadUrl() 112 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 35 [main->renderer] NewWindow
require(workbench.desktop.main.js) 324 [renderer] cached data: NO, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 72 [renderer] -
init workspace service 75 [renderer] -
register extensions & spawn extension host 412 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 2 [renderer] 1: workbench.editors.gettingStartedInput
overall workbench load 89 [renderer] -
workbench ready 3068 [main->renderer] -
renderer ready 494 [renderer] -
shared process connection ready 180 [renderer->sharedprocess] -
extensions registered 3555 [renderer] -

Note: there aren't any slowdown here in the require(workbench.desktop.main.js) or init storage/init workspace service steps, when activating the trace mode with an empty data folder.

@deepak1556
Copy link
Collaborator

Seems like you have specified --disable-gpu --no-sandbox when collecting the runtime trace, can you collect the trace only with the flags mentioned in #192493 (comment). On the other hand, one of these two flags has helped unblocking the render process creation time, my bet is on the gpu process launch but we can confirm with a new trace.

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 11, 2023

Here is the trace without --disable-gpu --no-sandbox, with an empty data folder :
code-insiders-RILf3NN0.trace.txt.tar.gz

Associated performance marks (no slowdown in the require(workbench.desktop.main.js) step)
What Duration Process Info
start => app.isReady 2711 [main] initial startup: true
nls:start => nls:end 0 [main] initial startup: true
require(main.bundle.js) 55 [main] initial startup: true
start crash reporter 0 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 28 [main] initial startup: true, state: 0ms, widget: 28ms, show: 0ms
app.isReady => window.loadUrl() 105 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 43 [main->renderer] NewWindow
require(workbench.desktop.main.js) 322 [renderer] cached data: NO, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 72 [renderer] -
init workspace service 73 [renderer] -
register extensions & spawn extension host 251 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 2 [renderer] 0:
overall workbench load 89 [renderer] -
workbench ready 3349 [main->renderer] -
renderer ready 492 [renderer] -
shared process connection ready 198 [renderer->sharedprocess] -
extensions registered 3685 [renderer] -

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 11, 2023

I think since activating the trace mode slows down VS Code, this leaves more time for the renderer to initialize, so we don't see the slowdown in the require(workbench.desktop.main.js) step.

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 11, 2023

I can reproduce part of the issue on another machine running on Ubuntu 20.04, where I observe that
almost 4s is spent on the init storage (global & workspace) and init workspace service steps, but only 50% of the time.
However I don't have any slowdown in the require(workbench.desktop.main.js) step.

@deepak1556
Copy link
Collaborator

Thanks for the traces, there are two points of interest from the runtime trace and the application profile.

  1. In all the cases when v8 cache data is involved, the renderer blocks the main thread in waiting for a sync ipc response from the browser storage area particularly from StorageAreaImpl::GetAll. Additionally, the application profile shows slowdown in
    if (window.localStorage.getItem(DefaultConfiguration.DEFAULT_OVERRIDES_CACHE_EXISTS_KEY)) {
    which also uses the same storage area from the browser process. So there is very likely a generic I/O slowdown or atleast specific to the leveldb backend.
Screenshot 2023-09-12 at 12 24 33
  1. The browser process does not start navigation until ~3s and there is a lot of idle time before the navigation starts in the current traces. So there be another IO block which is not seen in the current traces.
Screenshot 2023-09-12 at 12 25 22

@deepak1556
Copy link
Collaborator

@x-hgg-x can you provide the following additional data,

  1. Do you have any AV software installed on your OS that might affect the application launch

  2. Can you attach runtime traces when starting with the following flags code-insiders --trace --trace-category-filter="base,benchmark,browser,CacheStorage,content,IndexedDB,io,leveldb,gpu,mojom,renderer,renderer_host,startup,toplevel,v8". Make sure to use existing data directory, don't start with --disable-gpu or --no-sandbox or empty data directory.

@deepak1556
Copy link
Collaborator

I don't see any slowdown from the trace, the time navigation started in the main process till the renderer finished loading and started script execution is only 225ms

Main Process:
Screenshot 2023-09-21 at 23 12 22

Render process:
Screenshot 2023-09-21 at 23 12 06

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 21, 2023

Yes, when launching with a trace, the startup performance doesn't show any slowdown, since VS Code already takes 3s to launch:

Performance Marks with the trace
What Duration Process Info
start => app.isReady 2741 [main] initial startup: true
nls:start => nls:end 1 [main] initial startup: true
require(main.bundle.js) 34 [main] initial startup: true
start crash reporter 2 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 25 [main] initial startup: true, state: 0ms, widget: 25ms, show: 0ms
app.isReady => window.loadUrl() 72 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 50 [main->renderer] NewWindow
require(workbench.desktop.main.js) 156 [renderer] cached data: YES, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 14 [renderer] -
init workspace service 11 [renderer] -
register extensions & spawn extension host 152 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 59 [renderer] 1: PerfviewInput
overall workbench load 143 [renderer] -
workbench ready 3178 [main->renderer] -
renderer ready 317 [renderer] -
shared process connection ready 0 [renderer->sharedprocess] -
extensions registered 3377 [renderer] -

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 21, 2023

Here is the same trace, but from VS Code 1.81.1, where I don't have the issue:
code-jM5NipvU.trace.txt.tar.gz

Performance Marks with the trace for VS Code 1.81.1
What Duration Process Info
start => app.isReady 440 [main] initial startup: true
nls:start => nls:end 1 [main] initial startup: true
require(main.bundle.js) 35 [main] initial startup: true
start crash reporter 17 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 26 [main] initial startup: true, state: 0ms, widget: 25ms, show: 0ms
app.isReady => window.loadUrl() 74 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 51 [main->renderer] NewWindow
require(workbench.desktop.main.js) 188 [renderer] cached data: YES, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 13 [renderer] -
init workspace service 11 [renderer] -
register extensions & spawn extension host 144 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 51 [renderer] 1: PerfviewInput
overall workbench load 132 [renderer] -
workbench ready 902 [main->renderer] -
renderer ready 339 [renderer] -
shared process connection ready 118 [renderer->sharedprocess] -
extensions registered 1104 [renderer] -

@x-hgg-x
Copy link
Author

x-hgg-x commented Sep 21, 2023

Here is the profile and trace from the last insiders version, generated from the command code-insiders --prof-startup --trace --trace-category-filter="base,benchmark,browser,blink,blink.net,blink.resource,evdev,gpu,ipc,latency,mojom,navigation,navigation.debug,renderer,renderer_host,shell,startup,toplevel,v8,disabled-by-default-base,disabled-by-default-cpu_profiler,disabled-by-default-blink.debug,disabled-by-default-mojom":
profile and trace vscode-insiders.tar.gz

There is a big slowdown in the start => app.isReady step when activating the trace, which can go up to 15 seconds when combining the --trace and --prof-startup options.

In this case the window.loadUrl() => begin to require(workbench.desktop.main.js) step doesn't have any slowdown:

Performance Marks with the trace
What Duration Process Info
start => app.isReady 5666 [main] initial startup: true
nls:start => nls:end 1 [main] initial startup: true
require(main.bundle.js) 58 [main] initial startup: true
start crash reporter 2 [main] initial startup: true
serve main IPC handle 1 [main] initial startup: true
create window 25 [main] initial startup: true, state: 0ms, widget: 23ms, show: 0ms
app.isReady => window.loadUrl() 102 [main] initial startup: true
window.loadUrl() => begin to require(workbench.desktop.main.js) 117 [main->renderer] NewWindow
require(workbench.desktop.main.js) 364 [renderer] cached data: NO, node_modules took 0ms
wait for window config 1 [renderer] -
init storage (global & workspace) 26 [renderer] -
init workspace service 14 [renderer] -
register extensions & spawn extension host 152 [renderer] -
restore viewlet 0 [renderer] -
restore panel 0 [renderer] -
restore & resolve visible editors 66 [renderer] 1: PerfviewInput
overall workbench load 157 [renderer] -
workbench ready 6440 [main->renderer] -
renderer ready 557 [renderer] -
shared process connection ready 146 [renderer->sharedprocess] -
extensions registered 6662 [renderer] -

@deepak1556
Copy link
Collaborator

Thanks for the perf marks, there are two issues in your case.

  1. When --trace options is provided,

    contentTracing.startRecording(traceOptions).finally(() => onReady());
    seems to impact start => app.isReady.

  2. When launched without --trace, window.loadUrl() => begin to require(workbench.desktop.main.js) is regressed

Both cases the work is done by the runtime, also it is interesting that 1) has an impact on the timings for 2). Investigating 2) with the current traces is useless as the timings are skewed. I am unable to repro 1) on my device, so seems specific to your setup. I will provide commands to collect perf data to investigate this further.

@jurisevo
Copy link

Having similar symptoms on Arch with version 1.82 (VSCodium). Slow startup has become very noticeable.

Version: 1.82.2
Release: 23257
Commit: a5004432af6600c99fa4f918a3f2f8df44df71e6
Date: 2023-09-14T18:27:11.315Z
Electron: 25.8.1
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 6.1.54-1-lts

@deepak1556
Copy link
Collaborator

@jurisevo slow startup can be for different reasons, please open a separate issue with relevant data following the steps at https://github.com/microsoft/vscode/wiki/Performance-Issues

@robinmalik
Copy link

Whilst I've not noticed issues with startup time, 1.82.something was kicking my CPU into overdrive whilst in use (simple script editing, nothing else). I could close VS Code and the CPU fan would spin down seconds later, and repeat this issue. Upgraded to 1.83 minutes ago and all is quiet so far.

@x-hgg-x
Copy link
Author

x-hgg-x commented Oct 7, 2023

A quick binary search on the insider old versions shows that the regression occured between 1606401 and 39e5daf, likely by ea490e5.

@ElCoyote27
Copy link

code-1.83.1-1696982959.el7.x86_64 on RHEL8 with a few extensions and startup time is > 10s
my machine has 1024Gb RAM, Fast NVMe storage and 52C/104Treads so it should go faster (pretty much everything else loads in the blink of an eye)

@robinmalik
Copy link

robinmalik commented Nov 7, 2023

@ElCoyote27 FWIW, 1.84.1 is GA now.

@x-hgg-x
Copy link
Author

x-hgg-x commented Nov 7, 2023

I have still the problem on 1.84.1.

@quyenvsp
Copy link

quyenvsp commented Nov 20, 2023

same on 1.84.2

@MaddyGuthridge
Copy link

I seem to be experiencing this issue, with window.loadUrl() => begin to require(workbench.desktop.main.js) taking around 10 seconds on average.

Startup Performance.md

@jwmdykes
Copy link

Still experiencing this issue on 1.85 on Fedora 39 and can confirm that the problem goes away when downgrading to 1.81.

@whitequark
Copy link

As far as I can tell, I'm experiencing this issue on VS Code 1.86 (Insiders as well) on Debian 12 with Intel graphics.

Extended renderer info (GLX_MESA_query_renderer):
    Vendor: Intel (0x8086)
    Device: Mesa Intel(R) UHD Graphics 630 (CFL GT2) (0x3e9b)

Startup Performance.txt

@whitequark
Copy link

To everyone else, try this:

code --disable-gpu --disable-software-rasterizer

(The launcher will complain about an unknown option, that's normal.)

@jurisevo
Copy link

@whitequark yes, this did improve startup. And yes, I also experience issues on a computer with Intel graphics: Mesa Intel® UHD Graphics.

What are some other implications of using these options, no GPU rendering I suppose?

To everyone else, try this:

code --disable-gpu --disable-software-rasterizer

@whitequark
Copy link

What are some other implications of using these options, no GPU rendering I suppose?

I have no idea honestly. VS Code still launches a GPU process and it's still doing something. It seems like not passing --disable-software-rasterizer makes --disable-gpu do nothing, which is incomprehensible to me. I could dig into the Chromium source code to figure out what is going on but I have far better uses of my time.

@jurisevo
Copy link

I could dig into the Chromium source code to figure out what is going on but I have far better uses of my time.

No need, thank you for your response!

I'm OK with patching the launcher command on this one computer that exhibits the issue.

@whitequark
Copy link

Can you share the patch? I made a shell alias but it seems to affect the launcher's behavior in some odd way.

@jurisevo
Copy link

Can you share the patch? I made a shell alias but it seems to affect the launcher's behavior in some odd way.

Well, patch is a strong word, I just changed the Exec stanza in VS Codium's desktop file.

--- /usr/share/applications/codium.desktop      2024-01-22 15:39:47.000000000 +0200
+++ /home/xxx/.local/share/applications/codium.desktop        2024-02-12 14:20:30.276279669 +0200
@@ -2,7 +2,7 @@
 Name=VSCodium
 Comment=Code Editing. Redefined.
 GenericName=Text Editor
-Exec=/usr/bin/codium --unity-launch %F
+Exec=/usr/bin/codium --unity-launch --disable-gpu --disable-software-rasterizer %F
 Icon=vscodium
 Type=Application
 StartupNotify=false
@@ -14,5 +14,5 @@
 
 [Desktop Action new-empty-window]
 Name=New Empty Window
-Exec=/usr/bin/codium --new-window %F
+Exec=/usr/bin/codium --new-window --disable-gpu --disable-software-rasterizer %F
 Icon=vscodium

@x-hgg-x
Copy link
Author

x-hgg-x commented Feb 12, 2024

You can also update ~/.vscode/argv.json, which contains permanent command line arguments for VSCode.

@whitequark
Copy link

Have you tried that? It seems to ignore disable-software-rasterizer in there.

@x-hgg-x
Copy link
Author

x-hgg-x commented Feb 12, 2024

You can also update ~/.vscode/argv.json, which contains permanent command line arguments for VSCode.

Unfortunately it also doesn't work for me, since apparently only a subset of the arguments are allowed : https://github.com/microsoft/vscode/blob/1.86.1/src/vs/workbench/electron-sandbox/desktop.contribution.ts#L344

@starball5
Copy link

lots more tickets following this about slowness. Ex. #196771, #202154, #202177, #203643, #204243, #205261, #205940, #206510.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
freeze-slow-crash-leak VS Code crashing, performance, freeze and memory leak issues linux Issues with VS Code on Linux under-discussion Issue is under discussion for relevance, priority, approach
Projects
None yet
Development

No branches or pull requests