DESCRIPTION

Restrict synchronization cache updates to specific resources

If a synchronization operation is only asking a specific set of
resources to be updated, only that particular set of resources
should be filtered out for an update of the synchronization
cache. This removes the need to walk the entire tree when the
user has only made changes to a small number of resources.

Bug: 358898
Change-Id: I36267891fac1e33ba38b98dd121f5877c5da54ee
Signed-off-by: Jaylon Avila xxx@xxx.xxx


COMMENTS

author: Jaylon Avila
date: 2011-10-28 21:57:10.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2011-10-28 21:57:16.000000000

Patch Set 3:

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

-------------------------------------
author: Jaylon Avila
date: 2011-10-28 22:03:07.000000000

Patch Set 3:

Interesting, can you try this and let me know if it works for you, Dariusz?

1. Close all projects except 'org.eclipse.jgit' and 'org.eclipse.jgit.console', which should both be version controlled with EGit.
2. Right-click on one of the projects > Team > Synchronize Workspace
3. Open one file from each project and make both editors dirty.
4. Ctrl+Shift+S to save all editors.
5. The refresh(IResource[], int, IProgressMonitor) method should be called with two projects.

Further optimization should be possible by only having the refresh be performed on those two individual files. I think we can have a separate change set centered around GitSubscriberMergeContext (which you were previously working on) for that.

-------------------------------------
author: Brenden Conley
date: 2011-10-28 22:10:18.000000000

Patch Set 3: Build Successful

Build Successful 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1846/ : SUCCESS

-------------------------------------
author: Leslie Stephenson
date: 2011-10-30 10:13:01.000000000

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

(1 inline comment)

In deed method refresh(IResource[], int, IProgressMonitor) is called with two projects. But after save, modified files don't show in sync view (in version from master modified files appears in sync view)

Line:162, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeSubscriber.java -> why don't you use:
path.length() == 0

-------------------------------------
author: Jaylon Avila
date: 2011-10-30 11:11:54.000000000

Patch Set 3:

You're right, Dariusz, thanks for catching this. How embarrassing. :|

What is interesting is that it _does_ work if I try org.eclipse.jgit.console and org.eclipse.jgit.iplog. It seems that the path filtering optimization causes the org.eclipse.jgit folder to not be traversed by the walk for some reason.

-------------------------------------
author: Jaylon Avila
date: 2011-10-30 12:21:49.000000000

Patch Set 3:

I've opened bug 362430 for the path filtering problem in JGit.

-------------------------------------
author: Jaylon Avila
date: 2011-10-30 13:08:59.000000000

Patch Set 3: (1 inline comment)



Line:162, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTreeSubscriber.java -> Done

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