-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Investigate startup performance regression #156864
Comments
Numbers on my local setup are not bad, although it is not 1:1 same setup as our perf bot since the bot runs the application as a service. Stable
Insiders
|
Also, confirmed that script streaming is enabled in Electron 19 with current Insiders. Chrome trace with script streaming enabled and disabled shows it does not impact workbench load for product builds. I will add some steps below to collect some relevant traces from the perf bot for further debugging. |
Thanks, just from the numbers it does look like for you Btw will also try with my Surface Laptop once I am in the office and once it arrived. To clarify: script streaming was just enabled for testing or are we generally back to script streaming? |
It is enabled by default in Electron 19 since the update made to
Yeah let me check on that. |
Couple of traces that would help from the perf bot once @jrieken gets back from vacation,
|
Fyi summary of my experiments:
[1] Setup:
|
I wonder if this could possibly be a result of opening VSCode in the background as a service, vs. opening it normally. We do pass the flags to disable Window occlusion and maybe support for that broke recently? Though I did try with Electron 18.3.5 and the slowness was still there... I checked Kusto again and here are the 50th percentile Avg: Avg: I do not really see a trend of slowness in |
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. |
@deepak1556 The perf machine doesn't run stable the same way it runs insiders. So, it is unlikely to yield comparable results. Unless both run (stable/insiders) happen "with ui". Also, did you run these check locally and didn't see a difference? Doing things on the perf machine isn't quick and easy as I'll be walking around with an USB stick |
Me neither but the variation between the days is quite large (1.865 to 1.627 for 1.71) |
@jrieken #156864 (comment) are the results from my machine. I have got some perf traces from @bpasero device, I will compare that with runs from my machine. @bpasero tried some exploration runs recently reverting to Electron 18 and it still showed slower numbers on the perf bot, pointing to a perf regression from the application. When Electron 19 was still in exploration in July we had some normal runs until https://vscodeteam.slack.com/archives/C3NBSM7K3/p1658318274765939 when both insiders on Electron 18 and exploration on Electron 19 started showing slower numbers on the perf machine since then, wondering if bisecting on that range would highlight offending commit. |
🤷 It's really tricky - I manually compared the build from #156864 (comment) on my mac, an arm windonw vm, and the perf machine but I couldn't see a clear trend here My suspicion is that it's a combination of things. On a high note: mac (at least) is significantly faster now. Almost by 1 second, I guess that's because of the improved crash reporter |
👍 , this is a good reminder to filter Kusto queries to only Windows when investigating perf-bot, otherwise the results will be flawed. I also noticed that macOS |
Just looking the perf machine telemetry shows a slow-down between insiders of the 3rd and 5th of August. This is all commits: https://github.com/microsoft/vscode/commits/main?since=2022-08-03&until=2022-08-05. The E19 adoption happened then but also other things. Perf Machine Telemetry Other things maybe have an impact
|
@mjbvz I have #158892 to revert both changes. In addition to the jsben.ch-numbers is see a slowdown in real world perf, not as drastic but consistent. On my M1 pro macbook it's just a delta of ~3ms but my suspicion is that this can easily be 20 or 30ms on the 10 year old perf machine. It's kinda desperate but there is something that slows down everything, so common util functions are a good guess |
hm, possibly but I can't view those benchmarks as the site appears compromised (it tries to redirect right away) |
https://vscodeteam.slack.com/archives/C3NBSM7K3/p1661330838069859 - looks like we pulled back ~30ms with today's insiders. Confirms my assumption about perf differences between my machine 🏃 and the perf bot 👴 |
@jrieken can you get the |
Looking at the I feel like the most recent perf regression is from Aug 16th to 17th which puts us here: 8e42bda...dd0ed93 Where 2857051 stands up to me. As it turns out, even though we had flipped the default of WCO to be enabled on Windows by default, it was not enabled until this commit. This will set vscode/src/vs/platform/windows/electron-main/windowImpl.ts Lines 298 to 300 in 947ca71
Unfortunately it does not look like we are tracking |
I am not able to get us back to
|
#160957 bundles our main files into single files, avoiding multiple Before we would have 10ish |
#161095 does the same for the files we require via non-async The net result is that there will only be 1 blocking |
I think it is fair to close this issue, we are back with good numbers: 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 |
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.The text was updated successfully, but these errors were encountered: