Community
Participate
Working Groups
The OSGi frameworks preference page (under plug-in development) hangs for 5+s for me when I navigate to it for the first time. It looks like it's doing some kind of scan on extension points or file system on the first go and then caching those results. After restarting eclipse the same delay is seen, so it looks like it's building up a transient view of something.
The delay seems to be coming from the final IPluginExtensionPoint point = call in the fourth line of the createContents method of OSGiFrameworkPreferencePage
Looks like the delay is coming from the creation of the pderegistry. The PDERegistry.getRegistry is instantiated on demand and it's the createRegistry call that's taking the time. If the PDE bundle is started it probably makes sense to create the registry then as opposed to first use, especially if that's triggered by the UI.
Single stepping through the code, PDERegistry.getContributionsTimestamp() is taking a long time because of the fPDETegistry.getModels() call, which is returning a 1000+ array of models and getting an exclusive or of the lastModified dates of the files and hash codes. In a runtime debug instance of eclipse (with a reused workspace/configuration) I couldn't get the PDE registry to save anything, in which case it always recreated the models anyway. If it's doing that then returning the current time might be just as effective.
Note: on this instance the localfile_1_0_0.dll wasn't load able because of security reasons (unable to load dlls through writable/workspace path). I don't think it's related because I can't see the extension registry using the LocalFile API from the eclipse file systems but mention it here for reference.
There's also a small delay due to the PDEImages being loaded and several hundred File lookups for icons. That's probably a separate issue though.
Created attachment 257750 [details] Fix for this issue
The PDE models are loaded "only" to decide whether or not to put a hyperlink ( if any) in the text in OSGi frameworks preference page. I think this is an overkill. Only when PDE models are loaded, we should provide try to put hyperlink in the text.
Based on previous comment, fixed using https://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=a2139e58a2af0ef4c08d7f5bbf26bcf91d3d6604
verified on Version: Neon (4.6) Build id: I20151207-0800