Project: JDT
Bug 157639 [package explorer] First opening of PackageExplorer takes long (during startup)
Reported: 2006-09-18 10:34:21 | Status: verified fixed

I rebooted my machine, started Eclipse with a large set of plugins. I noticed startup stalling in PDE core for about 20 seconds (felt like that). During warm startups the wait time is about 5-6s. I narrowed it down to PackageExplorer triggering ProblemView triggering JavaCore triggering initialization of all containters. My target platform has ~3,000 plugins, and PDE took a long time to scan them. My suggestion is to sping off line 40 below in a separate job instead of running on the same thread. Here is a stack trace: 96 org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51) 95 org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.runInitializer(PreferenceServiceRegistryHelper.java:275) 94 org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.applyRuntimeDefaults(PreferenceServiceRegistryHelper.java:130) 93 org.eclipse.core.internal.preferences.PreferencesService.applyRuntimeDefaults(PreferencesService.java:337) 92 org.eclipse.core.internal.preferences.DefaultPreferences.applyRuntimeDefaults(DefaultPreferences.java:162) 91 org.eclipse.core.internal.preferences.DefaultPreferences.loadDefaults(DefaultPreferences.java:231) 90 org.eclipse.core.internal.preferences.DefaultPreferences.load(DefaultPreferences.java:227) 89 org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:307) 88 org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:543) 87 org.eclipse.core.internal.preferences.DefaultPreferences.node(DefaultPreferences.java:149) 86 org.eclipse.core.internal.preferences.legacy.PreferenceForwarder.getDefaultPreferences(PreferenceForwarder.java:138) 85 org.eclipse.core.internal.preferences.legacy.PreferenceForwarder.getString(PreferenceForwarder.java:644) 84 org.eclipse.pde.internal.core.ExternalModelManager.getPluginPaths(ExternalModelManager.java:130) 83 org.eclipse.pde.internal.core.PluginModelManager.initializeTable(PluginModelManager.java:433) 82 org.eclipse.pde.internal.core.PluginModelManager.findEntry(PluginModelManager.java:169) 81 org.eclipse.pde.internal.core.RequiredPluginsInitializer.initialize(RequiredPluginsInitializer.java:38) 80 org.eclipse.jdt.internal.core.JavaModelManager.initializeContainer(JavaModelManager.java:1900) 79 org.eclipse.jdt.internal.core.JavaModelManager.getClasspathContainer(JavaModelManager.java:1267) 78 org.eclipse.jdt.core.JavaCore.getClasspathContainer(JavaCore.java:1470) 77 org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2169) 76 org.eclipse.jdt.internal.core.JavaProject.getResolvedClasspath(JavaProject.java:2073) 75 org.eclipse.jdt.internal.core.JavaModelManager.determineIfOnClasspath(JavaModelManager.java:808) 74 org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:697) 73 org.eclipse.jdt.internal.core.JavaModelManager.create(JavaModelManager.java:626) 72 org.eclipse.jdt.core.JavaCore.create(JavaCore.java:1383) 71 org.eclipse.jdt.internal.ui.ResourceAdapterFactory.getAdapter(ResourceAdapterFactory.java:44) 70 org.eclipse.core.internal.runtime.AdapterFactoryProxy.getAdapter(AdapterFactoryProxy.java:63) 69 org.eclipse.core.internal.runtime.AdapterManager.getAdapter(AdapterManager.java:256) 68 org.eclipse.core.runtime.PlatformObject.getAdapter(PlatformObject.java:66) 67 org.eclipse.jdt.internal.ui.filters.NamePatternFilter.select(NamePatternFilter.java:62) 66 org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer.isFiltered(ProblemTreeViewer.java:187) 65 org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$PackageExplorerProblemTreeViewer.isFiltered(PackageExplorerPart.java:301) 64 org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer.isExpandable(ProblemTreeViewer.java:174) 63 org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:1900) 62 org.eclipse.jface.viewers.AbstractTreeViewer.updatePlus(AbstractTreeViewer.java:2487) 61 org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:754) 60 org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:731) 59 org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) 58 org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:705) 57 org.eclipse.jface.viewers.TreeViewer.createChildren(TreeViewer.java:892) 56 org.eclipse.jface.viewers.AbstractTreeViewer$5.run(AbstractTreeViewer.java:1288) 55 org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1323) 54 org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$PackageExplorerProblemTreeViewer.preservingSelection(PackageExplorerPart.java:402) 53 org.eclipse.jface.viewers.AbstractTreeViewer.inputChanged(AbstractTreeViewer.java:1277) 52 org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:250) 51 org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1542) 50 org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.createPartControl(PackageExplorerPart.java:636) 49 org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:332) 48 org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:197) 47 org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:566) 46 org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:290) 45 org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:525) 44 org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:140) 43 org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:268) 42 org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65) 41 org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:394) 40 org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1144) 39 org.eclipse.ui.internal.PartStack.createControl(PartStack.java:620) 38 org.eclipse.ui.internal.PartStack.createControl(PartStack.java:532) 37 org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:562) 36 org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:244) 35 org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:815) 34 org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2436) 33 org.eclipse.ui.internal.WorkbenchWindow$6.run(WorkbenchWindow.java:2616) 32 org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67) 31 org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:2597) 30 org.eclipse.ui.internal.WorkbenchWindow.restoreState(WorkbenchWindow.java:1982) 29 org.eclipse.ui.internal.Workbench.doRestoreState(Workbench.java:2857) 28 org.eclipse.ui.internal.Workbench.access$14(Workbench.java:2805) 27 org.eclipse.ui.internal.Workbench$19.run(Workbench.java:1681) 26 org.eclipse.ui.internal.Workbench.runStartupWithProgress(Workbench.java:1414) 25 org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1679) 24 org.eclipse.ui.internal.Workbench.access$12(Workbench.java:1650) 23 org.eclipse.ui.internal.Workbench$17.run(Workbench.java:1529) 22 org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) 21 org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1473) 20 org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183) 19 org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:702) 18 org.eclipse.ui.internal.Workbench.init(Workbench.java:1085) 17 org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1847) 16 org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) 15 org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) 14 org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) 13 org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) 12 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) 11 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) 10 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400) 9 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177) 8 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 7 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64) 6 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 5 java.lang.reflect.Method.invoke(Method.java:615) 4 org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) 3 org.eclipse.core.launcher.Main.basicRun(Main.java:280) 2 org.eclipse.core.launcher.Main.run(Main.java:977) 1 org.eclipse.core.launcher.Main.main(Main.java:952)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/filters/NamePatternFilter.java