DESCRIPTION

[sync] Fix performance problem with GitModelCache#getChildren

The problem was that it returned a child for each changed file, instead
of only the direct children. So e.g. with changes in "dir/a", "dir/b"
and "dir/c", it returned a node for "dir" three times. When the number
of changes is significant, this resulted in many children returned, each
of which also has children which will be processed by the calling code.

The code in GitModelCommit for tree construction did it right. To fix
this, this change consolidates the two tree construction implementations
into one which should be correct.

It also takes care that the final tree nodes use as little memory as
possible by using arrays.

Bug: 396209
Change-Id: I0f139cf7747affb06b32cee584355cf60b46fb76


COMMENTS

author: Leslie Stephenson
date: 2013-02-01 14:07:21.000000000

Patch Set 1: I would prefer that you didn't submit this

(1 inline comment)



Line:19, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelWorkingTree.java -> unused import?

-------------------------------------
author: Danika Greer
date: 2013-02-01 14:27:32.000000000

Patch Set 1: (1 inline comment)



Line:19, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelWorkingTree.java -> It didn't need an import before as it was in the base class. Now it does as it's separate.

-------------------------------------
author: Leslie Stephenson
date: 2013-02-01 21:33:36.000000000

Patch Set 1: Verified; Looks good to me, approved; IP review completed

(1 inline comment)



Line:19, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/model/GitModelWorkingTree.java -> OK, now I see

-------------------------------------
author: Leslie Stephenson
date: 2013-02-01 21:33:39.000000000

Change has been successfully merged into the git repository.

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