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

ConfigurationActivator should lazy load the PlatformConfiguration #1572

Closed
laeubi opened this issue Sep 30, 2024 · 2 comments
Closed

ConfigurationActivator should lazy load the PlatformConfiguration #1572

laeubi opened this issue Sep 30, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request performance

Comments

@laeubi
Copy link
Contributor

laeubi commented Sep 30, 2024

Currently ConfigurationActivator eagerly loads and creates PlatformConfiguration, as this involves scanning a lot of jar files I noticed this becomes quite slow on Windows.

As the field is only read when calling ConfigurationActivator.getBundleGroups() the creation and initialization of the object should be handled there to shift the penalty to the place where it is actually required, callers can then for example benefit from the UI and inform the user that something is in progress instead of blocking the OSGi Startup in general, whether or not the information is used at all.

This might not be noticeable in a regular IDE if the windows defender exclusion is in place or might depend on other factors but seems easy enough to improve the situation for example custom RCP application.

@laeubi laeubi added the enhancement New feature or request label Sep 30, 2024
@IamLRBA
Copy link

IamLRBA commented Oct 24, 2024

@laeubi I believe since PlatformConfiguration is being eagerly created, it is initialized as soon as the ConfigurationActivator is activated, even if it is not immediately needed. Just as you have described. This causes a delay in OSGi startup due to scanning many JAR files, especially on Windows.
I would like to be assigned to this issue to work on it please.
Thanks!

@laeubi laeubi self-assigned this Dec 15, 2024
@laeubi
Copy link
Contributor Author

laeubi commented Dec 15, 2024

@IamLRBA as this affects some (very old) core eclipse component I would not recommend this task for newcomers but I'm currently working on this!

laeubi added a commit to laeubi/eclipse.platform that referenced this issue Dec 15, 2024
Currently the activator created the factory (but only register it as a
plain service) and on the other hand the BundleGroupComponent then
access the activator in a static way.

This now decouples the Factory and BundleGroupComponent from the
activator by making them components.

Fix eclipse-platform#1572
@laeubi laeubi closed this as completed in 8b8afca Dec 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance
Projects
None yet
Development

No branches or pull requests

3 participants