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

Open
laeubi opened this issue Sep 30, 2024 · 1 comment
Open

ConfigurationActivator should lazy load the PlatformConfiguration #1572

laeubi opened this issue Sep 30, 2024 · 1 comment
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!

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