-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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 perf regression in #performance bot #101083
Comments
Some observations from the profiles, Electron 8 : I couldn't find a equivalent notifyReady call in Electron 7 but for consistency the crash reporter in the render gets initialized via ipc to the main just before the workbench is finished, comparing the timings Electron 7 : Comparing the readiness of shared process Electron 8 : |
Electron 8 numbers don't reflect the actual poor startup numbers we are seeing on the performance channel, @jrieken the test seems to be done on a fresh user data directory, should we try checking numbers from the user data directory of the perf bot ? |
Unsure about that, maybe some random changes that we also sometimes see with the bot. Or the fact that this is run manually, e.g with screen on and not triggered by the task scheduler? Also, do we have a clue how the user data dir would impact this? This would be bad because it affects all users, right? |
The tests are done on the user data dir
this is unlikely the issue here, chromium is pretty cautious about blocking calls that can happen on the UI thread during startup, most of the file IO operations will be delegated as tasks to a threadpool https://chromium.googlesource.com/chromium/src.git/+/master/docs/threading_and_tasks.md. If something weird goes on here the chrome tracing profile data will reveal it. I don't see such a case with the provided traces.
this is an interesting one, can you share the task scheduler script used, I would like to test on my machine. |
@bpasero shared the task scheduler script on slack just now, will play with it tomorrow and get back. |
Imported the scheduler script, only adjustment was the trigger action being set to workstation lock. The final numbers were equally good as the numbers seen previously on my machine. @jrieken can you get a chrome trace from running the perf script via the task scheduler, also lets try using the default data dir used by the perf bot |
Not sure if this helps, but I just noticed a new
|
@bpasero the screenshots with category electron I posted in #101083 (comment) are based on those events. They only trace the electron ipc calls |
@deepak1556 The zip are traces for |
Thanks for the traces, with Electron 8 task scheduler run there are repeated blocks of Electron 8: Electron 7: |
I am not sure if this is a bug in chromium trying to connect with so many retries, I was under the impression it would disable gpu after certain failed tries but doesn't seem to be. @jrieken as a next step,
|
Closing this as we know that this is happening only in the "run vscode without UX" case. The underlying cause is unknown tho |
I would like to investigate the underlying issue, certainly seems like a bug in chromium or if its the predefined behavior would be good to understand why, can we keep this open for debt work ? |
Refs #97638 (comment)
@jrieken lets start with tracing chrome and our own js code in the main process to eliminate any app specific issues.
Chrome startup trace -
code-insiders <path-to-vscode> <path-to-vscode-package.json> --trace-startup --trace-startup-duration=20
, this will run the trace for 20seconds and will generate a filechrometrace.log
. Perform this for both code and code-insiders.App main process JS profiling -
code-insiders <path-to-vscode> <path-to-vscode-package.json> --inspect-brk
and visitchrome://inspect
>open devtools for node
, this will automatically attach the debugger. take cpu profile until the app finishes the startup loading. Attach the logs from bothcode
andcode-insiders
If both these logs can't identify the problem then we can go down a more sophisticated yet effective ETW tracing.
The text was updated successfully, but these errors were encountered: