-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[electron] improve startup performance #5284
Comments
Please check console logs. If some contributions exceed 200ms they should be reported. |
Measure and find a real root cause :) |
@vince-fugnitto please compile in development mode, to see what |
probably #3413 |
The first is |
Now you should use the node profiler to record CPU snapshot during start up and analyse call-stack for these methods to see where time is actually spent. |
Thank you for your help @akosyakov, I'm still learning on how to profile and everything so I appreciate the guidance. |
You might have to modify the generated electron-main JS as we do not want to profile the electron process but the backend process forked from the electron-main. Now, here it gets tricky, as we run the code differently for a bundled electron application and for the development environment. If you want to profile the backend process, you have to pass the |
Would it be possible to finish the review and merge #4869 to increase the user experience, perhaps after the release? |
At application startup, we send out a couple thousand preference change events. Each of them triggers a menu update. It semms to be expensive. Debounced it. Closes #5284. Signed-off-by: Akos Kitta <[email protected]>
At application startup, we send out thousands of preference change events. Each of them triggers a menu update. It seems to be expensive. Debounced it. Closes #5284. Signed-off-by: Akos Kitta <[email protected]> s Signed-off-by: Akos Kitta <[email protected]>
At application startup, we send out thousands of preference change events. Each of them triggers a menu update. It seems to be expensive. Debounced it. Closes #5284. Signed-off-by: Akos Kitta <[email protected]> s Signed-off-by: Akos Kitta <[email protected]>
At application startup, we send out thousands of preference change events. Each of them triggers a menu update. It seems to be expensive. Debounced it. Closes #5284. Signed-off-by: Akos Kitta <[email protected]> s Signed-off-by: Akos Kitta <[email protected]>
Description
This is an epic issue to discuss and tackle improving the startup performance for Electron.
Currently, starting an Electron application can take considerable time, therefore we should take measures to actively tackle performance issues on Electron, and consequently improve the overall performance and speed of the entire application.
Considerations
initialize
,initializeLayout
andonStart
.Steps to Reproduce
Created a streamlined Electron application (
package.json
) and build it using:(yarn && yarn theia build --mode production && yarn theia rebuild:electron)
Results
yarn theia start
yarn theia start ~/theia-workspace-theia
The performance degrades as more extensions are present, and if a workspace is opened on start-up which leads me to believe there might be an extension which slows down the startup or waits for other contributions to be ready.
If anyone had ideas on how the performance can be improved, please let me know 😃
cc @marcdumais-work @marechal-p @lmcbout @thegecko @kittaakos
Updates
onStart
onStart
The text was updated successfully, but these errors were encountered: