vscode: Investigate startup performance regression

It seems that the exploration builds run slower. One theory is that maybe the disabled script streaming has an impact (this was needed to unblock sandbox working on Linux when running out of sources). Should validate if we actually load multiple scripts on startup that could now result in a waterfall without script streaming.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (25 by maintainers)

Commits related to this issue

Most upvoted comments

I think it is fair to close this issue, we are back with good numbers:

image

We will list individual changes that went in during this milestone in our release notes: https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_72.md#improved-startup-performance

We will also continue to improve startup performance: https://github.com/microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Aperf-startup

https://github.com/microsoft/vscode/pull/161095 does the same for the files we require via non-async <script> tags in workbench.html. This requires us to ship 2 versions of the HTML files, depending on running out of sources vs. built.

The net result is that there will only be 1 blocking <script> tag and not 4.

https://github.com/microsoft/vscode/pull/160957 bundles our main files into single files, avoiding multiple require calls that have to go to disk. It covers main.js, cli.js (and also our server startup files).

Before we would have 10ish require calls for things like loader.js which are then all inlined to the file. The only file we still have to load from disk is product.json because it is changed after minification task.

We do pass the flags to disable Window occlusion and maybe support for that broke recently?

Nope it is still supported, although this came up today from chromium folks and they are recommending embedders to disable the feature by default due to lock contentions for the window events. I will go ahead and make that change this iteration.

Fyi summary of my experiments:

  • cannot reproduce a slowdown on my new Surface Laptop 3 with Windows 11 [1]
  • running exploration build on the perf bot
    • same slowness when going back to Electron 18
    • same slowness when disabling sandbox and utility process

[1] Setup:

  • simple TS project, package.json opened
  • startup perf editor in second column
  • same startup CLI flags as perf bot
  • looking for workbench ready numbers