Open mxdr opened 1 year ago
| window.loadUrl() => begin to require(workbench.desktop.main.js) | 35783 | [main->renderer] | NewWindow |
@deepak1556 This is another one where creating the renderer is very slow
@mxdr can you perform the following steps to help us get a runtime trace,
1) Closing all running instances of VSCode
2) Start a fresh instance with the following arguments code --trace --trace-category-filter="base,benchmark,browser,content,blink,blink.net,blink.resource,gpu,latency,mojom,navigation,navigation.debug,renderer,renderer_host,startup,toplevel,v8,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.
@deepak1556 Done, here it is: code-6frz3iih.trace.txt.tar.gz
Thanks for the trace, there are two things that stand out
1) render process is stuck establishing gpu channel for 25s. 2) Main process takes 10s before navigation starts, possibly long IO task
@mxdr can you start with code --disable-gpu
and attach the perf marks https://github.com/microsoft/vscode/wiki/Performance-Issues#read-the-startup-timers
@deepak1556 Sure thing. I ran code --disable-gpu
and saved the startup performance output as a markdown file to avoid clogging this page, attached:
startup-info-gpu-disabled.md
Here are profiler files, collected with code --disable-gpu --prof-startup
prof-UmCoXyRN.renderer.cpuprofile.txt
prof-UmCoXyRN.main.cpuprofile.txt
Update: I upgraded my display driver from nvidia-driver-525
to nvidia-driver-535
and VSCode now starts much faster. Still not as fast as it used to, though.
Interesting, the perf marks from https://github.com/microsoft/vscode/issues/192766#issuecomment-1715490712 indicate a similar issue to https://github.com/microsoft/vscode/issues/192493
Can you share the perf marks with the launch after updated display drivers. Thanks!
@deepak1556 After updating display drivers:
prof-e36RhlAo.extHost.cpuprofile.txt prof-e36RhlAo.main.cpuprofile.txt prof-e36RhlAo.renderer.cpuprofile.txt
Try this:
code --disable-gpu --disable-software-rasterizer
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
Performance Marks
prof-hzsgjWke.main.cpuprofile.txt 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
Raw Perf Marks: main
Raw Perf Marks: localPtyHost
Raw Perf Marks: renderer
Loader Stats
Load AMD-module
Load commonjs-module
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
Invoke commonjs-module
Node Cached Data Stats
cached data used
cached data missed
cached data rejected
cached data created (lazy, might need refreshes)
Resource Timing Stats
prof-hzsgjWke.main.cpuprofile.txt prof-hzsgjWke.renderer.cpuprofile.txt