Community
Participate
Working Groups
Build: I20050419 Now that the extension registry is loaded from disk lazily, every API call to the extension registry is potentially slower. One common example is code that wants to find the plugin ID for a configuration element. This is commonly done like so: IConfigurationElement.getDeclaringExtension().getNamespace() Since obtaining the declaring extension might require loading from disk, the namespace value is now cached on the configuration element. Calls like the above can now be replaced by: IConfigurationElement.getNamespace() This shorter call is 50% faster on average. Here are the references I found in the org.eclipse.ui.* plugins that can be improved in this way (I did a text search for "getDeclaringExtension().getNamespace(): org.eclipse.ui.editors/src/org/eclipse/ui/editors/text/templates - ContributionTemplateStore.java org.eclipse.ui.editors/src/org/eclipse/ui/texteditor - MarkerAnnotationPreferences.java org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs - WorkbenchWizardElement.java org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/intro - IntroDescriptor.java (2 matches) org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/misc - ExternalEditor.java org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/part/services - WorkbenchPartFactory.java (2 matches) org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry - StickyViewDescriptor.java org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry - ViewDescriptor.java org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/registry - WorkingSetDescriptor.java (2 matches) org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/themes - ThemeRegistryReader.java org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal - ActionDescriptor.java (2 matches) org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal - PartSite.java org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal - PluginAction.java (2 matches) org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part - IntroPart.java org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/part - WorkbenchPart.java org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/preferences - PreferenceTransferElement.java org.eclipse.ui.workbench/Eclipse UI Components/org/eclipse/ui/internal/components - ComponentUtil.java org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/quickdiff - ReferenceProviderDescriptor.java org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor/spelling - SpellingEngineDescriptor.java org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/texteditor - AnnotationPreference.java
I've been doing this as I've found the cases so I'll go ahead and finish the rest.
Marking fixed for the workbench cases. Attaching patches that address the cases in the text cases.
Created attachment 20183 [details] Patch for org.eclipse.ui.texteditor
Created attachment 20184 [details] Patch for org.eclipse.ui.editors
Thanks for the patches. Found another occurrence in org.eclipse.ui.texteditor.ConfigurationElementSorter and also scanned and fixed Platform Search.
Verified in I20050509-2010