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

feat: remove sync fs calls from backend+plugin code #12798

Merged
merged 11 commits into from
Aug 14, 2023

Conversation

kittaakos
Copy link
Contributor

@kittaakos kittaakos commented Aug 3, 2023

What it does

Read plugin contributions asynchronously to avoid blocking and improve backend application startup.

Changed PluginScanner#getContribution from sync to async. The protected Theia and grammar scanner APIs were affected: they have been adjusted to async.

I have noticed loading all the translations and contributions takes half a second in a downstream project:

This PR removes all sync fs calls in git, siw, and workspace extensions.

Screenshot 2023-08-03 at 18 01 13

How to test

VS Code extensions still load, and all works fine.

Review checklist

Reminder for reviewers

@msujew msujew added performance issues related to performance plug-in system issues related to the plug-in system labels Aug 3, 2023
@kittaakos
Copy link
Contributor Author

kittaakos commented Aug 4, 2023

I put the PR back to draft. I want to remove all sync FS calls in the backend and plugin code and submit a more extensive PR. There will be plenty of time for the review before the next release (if it happens end of August). Done ✅

@kittaakos kittaakos marked this pull request as draft August 4, 2023 06:40
@kittaakos kittaakos changed the title feat: read plugin contributions async feat: remove sync FS calls in backend+plugin code Aug 4, 2023
@kittaakos kittaakos force-pushed the async-plugin-scanner branch 4 times, most recently from 186037c to 3f22333 Compare August 4, 2023 11:11
@kittaakos kittaakos marked this pull request as ready for review August 4, 2023 14:47
@kittaakos kittaakos changed the title feat: remove sync FS calls in backend+plugin code feat: remove sync fs calls from backend+plugin code Aug 4, 2023
@kittaakos
Copy link
Contributor Author

Great review, Mark. Thank you!

Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me 👍

Just one comment, see below.

packages/plugin-ext/src/main/node/plugin-deployer-impl.ts Outdated Show resolved Hide resolved
@JonasHelming
Copy link
Contributor

@msujew Could you merge?

@msujew msujew merged commit 04c8cf0 into eclipse-theia:master Aug 14, 2023
6 checks passed
@vince-fugnitto vince-fugnitto added this to the 1.41.0 milestone Aug 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance issues related to performance plug-in system issues related to the plug-in system
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants