Describe the bug
Opening the first context menu in the package explorer/navigator of an application containing ELK leads to a notable delay before the menu becomes visible. ELK causes half a second of delay by loading layout services when it's property tester is used the first time:
Expected behavior
Bundle activators should do as little work as possible, as bundle activation can be triggered by UI interaction and will then slow down everything happening on the UI thread.
Describe the bug Opening the first context menu in the package explorer/navigator of an application containing ELK leads to a notable delay before the menu becomes visible. ELK causes half a second of delay by loading layout services when it's property tester is used the first time:
Expected behavior Bundle activators should do as little work as possible, as bundle activation can be triggered by UI interaction and will then slow down everything happening on the UI thread.
ELK Version 0.9.0
Additional context Looking at the relevant method at https://github.com/eclipse/elk/blob/f53099f7fee46735a88c0b4d67fcdf943a0179f2/plugins/org.eclipse.elk.core.service/src/org/eclipse/elk/core/service/ElkServicePlugin.java#L136 it seems like all of that could be executed inside of
LayoutMetadataService.getInstance()
instead, which would defer the code until it's needed, and the plugin activation would be fast again.