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
Waterfall startup sequence #17108
Comments
The baseline electron app can be found here: https://github.com/jrieken/electron-startup-perf-baseline |
related to #15455 |
Can you put the timings for vanilla vs code side-by-side on a table, along with their relative difference? Makes it easy to reason about things. |
|
…ke use not spawn a process which saves at least 10ms, #17108
The following are some operation we perform that take long, like spawning a process or listening on a port
The startup logic should be optimised to start loading |
Would it not be possible to wait creating the shared process until the first window is loading? All shared process related methods are promises anyways and it seems ok to wait until a window is visible. Now that we look into moving the shared process into a real Electron window, I fear that startup would even get slower compared to just spawning a process. For the |
Yes - we are moving the shared process into a browser window to begin with and should then also be able to make it after the first, user-windows started loading: #22091 |
fyi - I have moved waiting for the ready-state into the |
is there any further progress here @jrieken since you apparently started working on it? |
I've changed the @jrieken |
Yeah, no real clue. The good news is that I haven't seen it take much longer on other machines. So in contrast to launching (part of getmac) which can take a second on some machines this seems to be more or less constant. Ok for me to leave it as is |
Cool, let's close it! |
The overall startup sequence from starting the main process to starting the renderer process is waterfall'ish, esp. since we don't just wait for the app to be ready but because we do many things before starting the renderer (which itself doesn't do anything else than loading code for the first 1 second). Let's identify what can run after or in parallel to getting the renderer ready. Also, I have created a benchmark, stripped down, electron app, which should set the baseline - we can't get faster but should strive to become as close as possible.
The timings for a simple app (attached) are
VS Code (on my mac) takes ~750ms before loading the main window (compare to
mainWindow,created
) and ~1200ms before loading the big chunk of code (workbench.min.js, compare withrenderer,html
). That makes roughly 600ms that are spending somewhere. Since that is roughly the time it takes to load the main portion of our code, I wonder if those 600ms initialisation work can run in parallel, while we load the code of the workbench.The text was updated successfully, but these errors were encountered: