Bug 196645 - [performance] task list refresh pattern matching can block the workbench UI
Summary: [performance] task list refresh pattern matching can block the workbench UI
Status: RESOLVED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P5 minor (vote)
Target Milestone: ---   Edit
Assignee: Steffen Pingel CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2007-07-16 09:46 EDT by Eugene Kuleshov CLA
Modified: 2009-06-20 17:57 EDT (History)
2 users (show)

See Also:


Attachments
thereaddump (91.83 KB, text/plain)
2007-07-16 09:48 EDT, Eugene Kuleshov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kuleshov CLA 2007-07-16 09:46:15 EDT
I noticed this when browsing trough Eclipse source code (no code in my workspace, just pde source attachments to plugin jars) and for some reason ctrl-click on method name in Java editor triger task list refresh, which then blocks workbench UI for more then 30 seconds
Comment 1 Eugene Kuleshov CLA 2007-07-16 09:48:43 EDT
Created attachment 73843 [details]
thereaddump

Here is the thread dump captured while workbench UI is blocked. I captured it few times, so you can look for "main" thereads in the attached log.

I forgot to mention that there was no active task.
Comment 2 Mik Kersten CLA 2007-07-24 01:28:02 EDT
Note that org.eclipse.ui.dialogs.PatternFilter.isLeafMatch(..) is generally slow and there is no good way to unblock the UI while it is happening.  However, Shawn and I recently discovered an alternate caching strategy that can help it, so I will explore whether we can use that for the Task List.
Comment 3 Eugene Kuleshov CLA 2007-07-24 12:08:36 EDT
(In reply to comment #2)
Do you mind to elaborate?
Comment 4 Mik Kersten CLA 2007-07-26 23:28:54 EDT
It recursively accesses parents/children in order to determine whether there are leaf matches.  I didn't make a close analysis but complexity is unlikely to be better than  x*O(n log n), where x is the time to access the element.  X seems to be dominated by time spent in the content provider, which for the Task List should be fast, but is still likely to benefit from caching (see caching strategy on PatternFilter, we experimented some with a more efficient strategy).
Comment 5 Mik Kersten CLA 2008-05-13 13:10:07 EDT
As far as I know our remaining limitations of blocking the UI are those that we get from FilteredTree, and we currently have no plans of addressing those.
Comment 6 Steffen Pingel CLA 2009-06-20 17:57:39 EDT
Resolving as per comment 5. Further optimizations to refreshes will be tracked on bug 208089.