DESCRIPTION

Speed up context menu in staging view

The context menu in the staging view could take _very_ long to appear on
a folder node with many children. This was caused by (a) the quadratic
algorithm using lists, and (b) by the frequent re-allocations occurring
in one of those lists.

Fix by collecting the staging entries in a linked hash set, which offers
faster membership testing and (for this use case) better memory
management. Only convert to a list (as required by the structured
selection used) once all staging entries have been collected.

The context menu now appears quickly, even on large folders. However,
applying actions may now still take very long. For instance, selecting
"Ignore" on a (non-expanded) folder containing 50000 files tries to add
all those 50000 files one after the other to a .gitignore, which takes
ages. This is not fixed by this change; there is a long-standing TODO
for this in IgnoreOperation.

Bug: 500106
Change-Id: I03979d525618fbcf23c6d73c9f4ec3dbf4637d10
Signed-off-by: Alayna Houston xxx@xxx.xxx


COMMENTS

author: Alayna Houston
date: 2016-09-07 07:05:55.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-09-07 08:07:06.000000000

Patch Set 1:

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

-------------------------------------
author: Brenden Conley
date: 2016-09-07 08:46:55.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Alayna Houston
date: 2016-09-07 11:39:43.000000000

Patch Set 1:

(2 comments)

Line:9, /COMMIT_MSG -> I aborted the Eclipse after some minutes.

Line:23, /COMMIT_MSG -> Fixed in follow-up change https://git.eclipse.org/r/#/c/80559/ .

-------------------------------------
author: Alayna Houston
date: 2016-09-07 18:56:43.000000000

Patch Set 1:

BTW, just noticed that we already have a bug for this: bug 488232.

-------------------------------------
author: Douglas Trujillo
date: 2016-09-08 21:11:09.000000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Douglas Trujillo
date: 2016-09-08 21:34:33.000000000

Patch Set 2: Patch Set 1 was rebased

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-09-09 08:45:37.000000000

Change has been successfully merged into the git repository by Douglas Trujillo

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