Skip to content
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

chore: improve frontend startup performance #90

Closed
wants to merge 6 commits into from

Conversation

sdirix
Copy link
Member

@sdirix sdirix commented Sep 12, 2023

The frontend awaits initialize, configure and onStart for all
frontend contributions. It's therefore very important that no expensive
code is run there.

By not awaiting expensive operations in

  • DebugFrontendApplicationContribution.onStart (~300ms)
  • EditorNavigationContribution.onStart (~36-400ms)
  • TerminalFrontendContribution.onStart (~100-300ms)

the reported startup time without using plugins is reduced by ~400-1000ms
which is an improvement of ~20-40%.

Contributed on behalf of STMicroelectronics


Note: I also tried to run all initialize, configure and onStart in "parallel", using Promise.all. However when combined with the remaining changes this actually lead to a slowdown, probably because the Javascript thread is already fully utilized.

@tsmaeder
Copy link
Collaborator

I was wondering how we are measuring startup time. In the case of a regular electron startup, these changes do not make a noticeable improvement, at least not a second.

@sdirix
Copy link
Member Author

sdirix commented Sep 13, 2023

In the worst case it's just 300ms faster which is not that noticeable in the overall Electron startup, especially if running in development mode which is much slower anyway.

I was simply relying on the internal measurements which you can retrieve when starting the application with --logLevel=debug. So the measured time is only counting for Frontend starting from FrontendApplication.start

@sdirix sdirix force-pushed the frontend-performance-improvements branch from c255f10 to acd9139 Compare September 13, 2023 14:52
@sdirix sdirix requested a review from tsmaeder September 13, 2023 15:01
@tortmayr tortmayr requested review from tortmayr and removed request for tsmaeder September 18, 2023 07:36
@sdirix
Copy link
Member Author

sdirix commented Sep 18, 2023

@tsmaeder Are you fine with the current state of the PR or do you see any problems with getting it merged. I would like to open it against upstream.

@tortmayr
Copy link

I also had a look at this.Everything seems to work as before and I can confirm the reported startup time improvements (based on the stopwatch measurements with --loglevel debug).
Also I was trying to identify certain edge cases that could break with the async-> sync changs but could not find anything.

JonasHelming and others added 3 commits September 18, 2023 16:30
* Add follow-up section to PR template

fixed eclipse-theia#12900

Signed-off-by: Jonas Helming <[email protected]>
Retiring the use of `context` in keybindings

- `Blame Keybinding context` deletion
- `Terminal Keybinding context` deletion
- `Console Keybinding Context` deletion
- `Debug Keybinding Context` deletion
- `Editor Keybinding Context` deletion
- `Notification Keybinding Contribution` deletion
- `Navigator Keybinding Context` deletion

Signed-off-by: Fernando Ascencio <[email protected]>
SamuelBergSTM and others added 3 commits September 20, 2023 12:56
)

Clarifies the error by suggesting it could be caused by network configuration issues.

Contributed by STMicroelectronics
Signed-off-by: Samuel BERG <[email protected]>
Closes eclipse-theia#12878

Signed-off-by: FernandoAscencio <[email protected]>
Co-authored-by: Vincent Fugnitto <[email protected]>
The frontend awaits 'initialize', 'configure' and 'onStart' for all
frontend contributions. It's therefore very important that no expensive
code is run there.

By not awaiting expensive operations in

 - DebugFrontendApplicationContribution.onStart (~300ms)
 - EditorNavigationContribution.onStart (~36-400ms)
 - TerminalFrontendContribution.onStart (~100-300ms)

the reported startup time without using plugins is reduced by ~400-1000ms
which is an improvement of ~20-40%.

Contributed on behalf of STMicroelectronics
@sdirix sdirix force-pushed the frontend-performance-improvements branch from acd9139 to 471a050 Compare September 25, 2023 11:01
@sdirix
Copy link
Member Author

sdirix commented Sep 25, 2023

Closed in favor of eclipse-theia#12936

@sdirix sdirix closed this Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants