DESCRIPTION

Remove delay in local repositories filter

When trying to filter the directory with the Android open source
repositories (around 1400 repos) there is a delay of several seconds
after each update of the filter mask.

The performance issue is caused by getting the checked items during
filter evaluation of each item completely again and therefore has O(n^2)
runtime. This change caches the checked items after each change of a
checkmark.

With the change there is no notable delay when filtering the same list
of 1400 repositories.

Change-Id: Iab65452ae62551c3f8e7a2ee594a5a238b802144
Signed-off-by: Jack Yu xxx@xxx.xxx


COMMENTS

author: Jack Yu
date: 2014-03-15 10:07:35.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-03-15 10:07:40.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/egit/job/egit.gerrit/5610/

-------------------------------------
author: Brenden Conley
date: 2014-03-15 10:21:41.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/egit/job/egit.gerrit/5610/ : SUCCESS

-------------------------------------
author: Kaden Henson
date: 2014-03-15 12:09:01.000000000

Patch Set 1: Code-Review-1

I think there are two additional events that should reset the checkedItems set. One is clicking the "(Un)Check All Repositories" buttons, which don't seem to trigger the CheckStateListener.The other case is browing/searching, which repopulates the list.

-------------------------------------
author: Danika Greer
date: 2014-03-15 15:21:41.000000000

Patch Set 1:

(1 comment)

Line:305, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> Would it be possible to use CachedCheckboxTreeViewer#getCheckedLeafElements instead?

-------------------------------------
author: Jack Yu
date: 2014-03-16 07:34:29.000000000

Patch Set 1:

(1 comment)

Line:305, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositorySearchDialog.java -> Thanks for pointing me to a much better alternative. Works indeed much faster without any additional code. New patch set coming...

-------------------------------------
