Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 213228 - [performance] improve task lookup efficiency of AbstractTaskContainer
Summary: [performance] improve task lookup efficiency of AbstractTaskContainer
Status: CLOSED MOVED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Vista
: P1 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 406376 (view as bug list)
Depends on: 210801
Blocks: 356110
  Show dependency tree
 
Reported: 2007-12-17 16:09 EST by Robert Elves CLA
Modified: 2016-06-17 14:59 EDT (History)
3 users (show)

See Also:


Attachments
thread dumps from start (2.03 KB, text/plain)
2007-12-19 23:59 EST, Mik Kersten CLA
no flags Details
ignore above, this is the dump (167.40 KB, text/plain)
2007-12-20 00:00 EST, Mik Kersten CLA
no flags Details
patch (3.56 KB, patch)
2008-10-19 04:18 EDT, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (6.82 KB, application/octet-stream)
2008-10-19 04:18 EDT, Steffen Pingel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Elves CLA 2007-12-17 16:09:13 EST
tasks.ui is starting up very slowly. Need to investigate where this performance problem is.
Comment 1 Mik Kersten CLA 2007-12-19 23:59:29 EST
Created attachment 85624 [details]
thread dumps from start
Comment 2 Mik Kersten CLA 2007-12-20 00:00:44 EST
Created attachment 85625 [details]
ignore above, this is the dump
Comment 3 Robert Elves CLA 2007-12-20 15:03:25 EST
I've committed some improvements to startup related to orphaned tasks.  Deferring further changes to 2.3 since risk of destabilizing is high.  Early in 2.3 I'll update AbstractTaskContainer to use a hashmap and will write unit tests to ensure url refactoring works correctly for all AbstractTaskContainer descendants including categories. This should result in considerable performance improvements.
Comment 4 Steffen Pingel CLA 2008-01-10 17:35:31 EST
Another spot that needs to be reviewed is the TaskActiviationHistory. It stores tasks in a list and relies on equals() for removing tasks.
Comment 5 Robert Elves CLA 2008-01-15 19:50:56 EST
Note to self: bug#210801 must be resolved first so that we can get straight forward access to task parents during handle refactoring
Comment 6 Robert Elves CLA 2008-02-07 21:22:47 EST
Further improvements will require guarding against formation of cycles in the tasklist model upon addition of tasks. Pushing to 3.0.
Comment 7 maarten meijer CLA 2008-02-08 10:47:05 EST
 There is a cyclic dependency check in AbstractTaskContainerPropertySource.java in method
 public boolean containsCyclic(AbstractTaskContainer parent) in the sandbox.dev tools.
 Maybe its a question of moving this functionality. See bug 210639 and bug 200235
Comment 8 Robert Elves CLA 2008-04-05 14:38:17 EDT
 (In reply to comment #6)
> Further improvements will require guarding against formation of cycles in the
> tasklist model upon addition of tasks. Pushing to 3.0.
See bug 200235

For use of hashmap in AbstractTaskContainer see bug#168878
Comment 9 Steffen Pingel CLA 2008-06-19 00:25:36 EDT
There is still a noticeable delay on startup when loading large task lists:

Thread [main] (Suspended) 
 String.equals(Object) line: 1018 
 TaskTask(AbstractTask).equals(Object) line: 236 
 CopyOnWriteArrayList<E>.eq(Object, Object) line: 131 
 CopyOnWriteArrayList<E>.remove(Object) line: 484 
 UnmatchedTaskContainer(AbstractTaskContainer).internalRemoveChild(ITask) line: 59 
 TaskList.removeOrphan(AbstractTask, Set<TaskContainerDelta>) line: 561 
 TaskList.addTask(ITask, AbstractTaskContainer) line: 164 
 DelegatingTaskExternalizer.readTaskReferences(AbstractTaskContainer, NodeList, TaskList) line: 357 
 TaskListExternalizer.readTaskList(TaskList, File) line: 239 
 TaskListExternalizationParticipant$1.execute(IProgressMonitor) line: 75 
 TaskList.run(ITaskListRunnable, IProgressMonitor) line: 621 
 TaskListExternalizationParticipant.load(File, IProgressMonitor) line: 79 
 TaskListExternalizationParticipant(AbstractExternalizationParticipant).performLoad(File, IProgressMonitor) line: 76 
 TaskListExternalizationParticipant.performLoad(File, IProgressMonitor) line: 84 
 TaskListExternalizationParticipant(AbstractExternalizationParticipant).execute(IExternalizationContext, IProgressMonitor) line: 66 
 ExternalizationManager$1.run() line: 114 
 SafeRunner.run(ISafeRunnable) line: 37 
 ExternalizationManager.load(IExternalizationParticipant, IProgressMonitor) line: 103 
 ExternalizationManager.load() line: 81 
 TasksUiPlugin.loadDataSources() line: 810 
 TasksUiPlugin.start(BundleContext) line: 602 
 BundleContextImpl$2.run() line: 1009 
 AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method] 
 BundleContextImpl.startActivator(BundleActivator) line: 1003 
 BundleContextImpl.start() line: 984 
 BundleHost.startWorker(int) line: 346 
 BundleHost(AbstractBundle).start(int) line: 265 
 SecureAction.start(Bundle, int) line: 400 
 EclipseLazyStarter.postFindLocalClass(String, Class, ClasspathManager) line: 111 
 ClasspathManager.findLocalClass(String) line: 427 
 DefaultClassLoader.findLocalClass(String) line: 193 
 BundleLoader.findLocalClass(String) line: 368 
 SingleSourcePackage.loadClass(String) line: 33 
 BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 441 
 BundleLoader.findClass(String, boolean) line: 397 
 BundleLoader.findClass(String) line: 385 
 DefaultClassLoader.loadClass(String, boolean) line: 87 
 DefaultClassLoader(ClassLoader).loadClass(String) line: 251 
 DefaultClassLoader(ClassLoader).loadClassInternal(String) line: 319 
 TasktopPreferencesInitializers.initializeDefaultPreferences() line: 26 
 PreferenceServiceRegistryHelper.runInitializer(IConfigurationElement) line: 276 
 PreferenceServiceRegistryHelper.applyRuntimeDefaults(String, WeakReference) line: 130 
 PreferencesService.applyRuntimeDefaults(String, WeakReference) line: 367 
 DefaultPreferences.applyRuntimeDefaults() line: 163 
 DefaultPreferences.loadDefaults() line: 236 
 DefaultPreferences.load() line: 232 
 DefaultPreferences(EclipsePreferences).create(EclipsePreferences, String, Object) line: 307 
 DefaultPreferences(EclipsePreferences).internalNode(String, boolean, Object) line: 543 
 DefaultPreferences(EclipsePreferences).node(String) line: 662 
 DefaultScope(AbstractScope).getNode(String) line: 38 
 DefaultScope.getNode(String) line: 68 
 ScopedPreferenceStore.getDefaultPreferences() line: 250 
 ScopedPreferenceStore.getPreferenceNodes(boolean) line: 284 
 ScopedPreferenceStore.internalGet(String) line: 474 
 ScopedPreferenceStore.getBoolean(String) line: 386 
 TasktopUiPlugin.start(BundleContext) line: 167 
 BundleContextImpl$2.run() line: 1009 
 AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method] 
 BundleContextImpl.startActivator(BundleActivator) line: 1003 
 BundleContextImpl.start() line: 984 
 BundleHost.startWorker(int) line: 346 
 BundleHost(AbstractBundle).start(int) line: 265 
 SecureAction.start(Bundle, int) line: 400 
 EclipseLazyStarter.postFindLocalClass(String, Class, ClasspathManager) line: 111 
 ClasspathManager.findLocalClass(String) line: 427 
 DefaultClassLoader.findLocalClass(String) line: 193 
 BundleLoader.findLocalClass(String) line: 368 
 SingleSourcePackage.loadClass(String) line: 33 
 BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 441 
 BundleLoader.findClass(String, boolean) line: 397 
 BundleLoader.findClass(String) line: 385 
 DefaultClassLoader.loadClass(String, boolean) line: 87 
 DefaultClassLoader(ClassLoader).loadClass(String) line: 251 
 DefaultClassLoader(ClassLoader).loadClassInternal(String) line: 319 
 TasktopWebUiPlugin.start(BundleContext) line: 81 
 BundleContextImpl$2.run() line: 1009 
 AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method] 
 BundleContextImpl.startActivator(BundleActivator) line: 1003 
 BundleContextImpl.start() line: 984 
 BundleHost.startWorker(int) line: 346 
 BundleHost(AbstractBundle).start(int) line: 265 
 SecureAction.start(Bundle, int) line: 400 
 EclipseLazyStarter.postFindLocalClass(String, Class, ClasspathManager) line: 111 
 ClasspathManager.findLocalClass(String) line: 427 
 DefaultClassLoader.findLocalClass(String) line: 193 
 BundleLoader.findLocalClass(String) line: 368 
 BundleLoader.findClassInternal(String, boolean, ClassLoader) line: 444 
 BundleLoader.findClass(String, boolean) line: 397 
 BundleLoader.findClass(String) line: 385 
 DefaultClassLoader.loadClass(String, boolean) line: 87 
 DefaultClassLoader(ClassLoader).loadClass(String) line: 251 
 BundleLoader.loadClass(String) line: 313 
 BundleHost.loadClass(String, boolean) line: 227 
 BundleHost(AbstractBundle).loadClass(String) line: 1274 
 EquinoxRegistryStrategy(RegistryStrategyOSGI).createExecutableExtension(RegistryContributor, String, String) line: 160 
 ExtensionRegistry.createExecutableExtension(RegistryContributor, String, String) line: 867 
 ConfigurationElement.createExecutableExtension(String) line: 243 
 ConfigurationElementHandle.createExecutableExtension(String) line: 51 
 Util.safeLoadExecutableExtension(IConfigurationElement, String, Class) line: 794 
 MenuAdditionCacheEntry.createControlAdditionContribution(IServiceLocator, IConfigurationElement) line: 330 
 MenuAdditionCacheEntry.createContributionItems(IServiceLocator, IContributionRoot) line: 194 
 WorkbenchMenuService$5.run() line: 563 
 SafeRunner.run(ISafeRunnable) line: 37 
 WorkbenchMenuService.processAdditions(IServiceLocator, Set, ContributionManager, AbstractContributionFactory, Set) line: 624 
 WorkbenchMenuService.addContributionsToManager(IServiceLocator, Set, ContributionManager, String, boolean, List) line: 685 
 WorkbenchMenuService.populateContributionManager(IServiceLocator, Set, ContributionManager, String, boolean) line: 671 
 TrimContributionManager$ToolBarTrimProxy.dock(int) line: 75 
 TrimContributionManager.update(boolean, boolean) line: 232 
 WorkbenchWindow.updateLayoutDataForContents() line: 3683 
 WorkbenchWindow.setLayoutDataForContents() line: 3694 
 WorkbenchWindow.createDefaultContents(Shell) line: 1112 
 WorkbenchWindowConfigurer.createDefaultContents(Shell) line: 625 
 IDEWorkbenchWindowAdvisor(WorkbenchWindowAdvisor).createWindowContents(Shell) line: 268 
 WorkbenchWindow.createContents(Composite) line: 998 
 WorkbenchWindow(Window).create() line: 431 
 Workbench$59.runWithException() line: 3339 
 Workbench$59(StartupThreading$StartupRunnable).run() line: 31 
 RunnableLock.run() line: 35 
 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 132 
 Display.runAsyncMessages(boolean) line: 3778 
 Display.readAndDispatch() line: 3403 
 IDEWorkbenchAdvisor(WorkbenchAdvisor).openWindows() line: 803 
 Workbench$27.runWithException() line: 1361 
 Workbench$27(StartupThreading$StartupRunnable).run() line: 31 
 RunnableLock.run() line: 35 
 UISynchronizer(Synchronizer).runAsyncMessages(boolean) line: 132 
 Display.runAsyncMessages(boolean) line: 3778 
 Display.readAndDispatch() line: 3403 
 Workbench.runUI() line: 2298 
 Workbench.access$4(Workbench) line: 2203 
 Workbench$5.run() line: 493 
 Realm.runWithDefault(Realm, Runnable) line: 288 
 Workbench.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 488 
 PlatformUI.createAndRunWorkbench(Display, WorkbenchAdvisor) line: 149 
 IDEApplication.start(IApplicationContext) line: 112 
 EclipseAppHandle.run(Object) line: 193 
 EclipseAppLauncher.runApplication(Object) line: 110 
 EclipseAppLauncher.start(Object) line: 79 
 EclipseStarter.run(Object) line: 379 
 EclipseStarter.run(String[], Runnable) line: 179 
 NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method] 
 NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39 
 DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25 
 Method.invoke(Object, Object...) line: 597 
 Main.invokeFramework(String[], URL[]) line: 549 
 Main.basicRun(String[]) line: 504 
 Main.run(String[]) line: 1236 
 Main.main(String[]) line: 1212 
Comment 10 Mik Kersten CLA 2008-06-19 11:36:49 EDT
Steffen: I assume that this should be on for 3.0.1 and not 3.0?
Comment 11 Steffen Pingel CLA 2008-06-19 12:21:11 EDT
I have moved this to 3.1 for now. I am not sure where the performance work fits best in the 3.x release cycle.
Comment 12 Steffen Pingel CLA 2008-10-19 04:18:19 EDT
Created attachment 115510 [details]
patch
Comment 13 Steffen Pingel CLA 2008-10-19 04:18:23 EDT
Created attachment 115511 [details]
mylyn/context/zip
Comment 14 Steffen Pingel CLA 2013-04-23 17:41:14 EDT
*** Bug 406376 has been marked as a duplicate of this bug. ***
Comment 15 Sam Davis CLA 2016-06-09 12:54:50 EDT
Jaxsun, you made some progress here. Should this be closed?
Comment 16 Jaxsun McCarthy Huggan CLA 2016-06-15 20:29:57 EDT
I did make improvements to the loading of the TaskList however I think much more could and should be done. There is still a lot of thrashing when reading the TaskList.
Comment 17 Sam Davis CLA 2016-06-17 14:59:16 EDT
Since that work was tracked on bug 493037, I'll remove the milestone from this one.
Comment 18 Eclipse Webmaster CLA 2022-11-15 11:45:08 EST
Mylyn has been restructured, and our issue tracking has moved to GitHub [1].

We are closing ~14K Bugzilla issues to give the new team a fresh start. If you feel that this issue is still relevant, please create a new one on GitHub.

[1] https://github.com/orgs/eclipse-mylyn