Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360658 - "Compare With" dialog has bad UI performance when filtering
Summary: "Compare With" dialog has bad UI performance when filtering
Status: RESOLVED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 1.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2011-10-12 08:17 EDT by Markus Keller CLA
Modified: 2012-07-15 08:02 EDT (History)
4 users (show)

See Also:


Attachments
Trace (4.35 KB, text/plain)
2011-10-12 08:17 EDT, Markus Keller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2011-10-12 08:17:02 EDT
Created attachment 205021 [details]
Trace

The "Compare With" dialog has bad UI performance when the filter pattern is changed, e.g. in repo git://git.eclipse.org/gitroot/pde/eclipse.pde.ui.git .

The problem is that
org.eclipse.egit.ui.internal.repository.RepositoriesViewContentProvider.getChildren(Object) and hasChildren(Object)
access the file system via RefDirectory.getRefs(String). Since this method is called often by the filter infrastructure, the UI feels sluggish and is often blocked.

The refs should be cached when the dialog is opened.
Comment 1 Markus Keller CLA 2011-10-18 14:11:40 EDT
Hmm, not minor any more for me.

Bug 360157 created the repository
git://git.eclipse.org/gitroot/platform/eclipse.platform.common.git
that merged the history of projects from 4 sources (releng, jdt.doc, platform.doc, pde.doc), and the combined list of tags is now huge.

When I open an AbstractBranchSelectionDialog and type "v", the refresh takes more than 5 seconds. That's enough for Windows to show the spin cursor and add "(No Response)" to the title bar of the dialog. When the UI thread runs again, the dialog lost the keyboard focus and I have to grab the mouse to continue entering the pattern.

The UI lag time should be below 100ms.
Comment 2 Remy Suen CLA 2011-10-22 14:05:50 EDT
Perhaps a DeferredTreeContentManager should be used instead??
Comment 3 Remy Suen CLA 2011-10-22 14:10:12 EDT
(In reply to comment #2)
> Perhaps a DeferredTreeContentManager should be used instead??

Actually, now that I think about it, I'm not sure how it would interact with a filter.
Comment 4 Markus Keller CLA 2011-10-23 10:56:55 EDT
(In reply to comment #3)
Yes, and a DeferredTreeContentManager would help solving this bug (bad performance).

The solution is really in comment 0:
> The refs should be cached when the dialog is opened.
Comment 5 Markus Keller CLA 2012-02-01 09:54:27 EST

*** This bug has been marked as a duplicate of bug 352253 ***
Comment 6 Markus Keller CLA 2012-02-01 09:58:26 EST
(In reply to comment #4)
> Yes, and a DeferredTreeContentManager would help solving this bug (bad
> performance).

Bad typo: It would *not* help solving the performance problem.
Comment 7 Markus Keller CLA 2012-07-12 16:49:46 EDT
Not a dup. Submitted fix: https://git.eclipse.org/r/6750
Comment 8 Robin Stocker CLA 2012-07-15 08:02:10 EDT
Merged as bd240a28adeecbbd14d30722f49c6888feb0b277.