DESCRIPTION

Introduce GitSynchronizer for logical model support

This allows providing distinct implementations when doing
synchronizations depending on whether or not the user is interested in
logical models.
The default synchronizer implementation does not deal with logical
models at all and thus provides the best performance.
The ModelAwareGitSynchronizer consults the logical model providers to
determine the set of resources involved in synchronization operations
and thus can have important performance impact especially on large
repositories. It uses a 'lazy' implementation of subscriber to load
additional resource revisions lazily when needed.
Preference 'allow models to participate...' now defaults to false.
This has an impact on the test cases that require logical model support,
where we now set-up the preference before running them.

Bug: 501990
Change-Id: I9322cef70c037e0b2c270a7c2bab7d2ffd278f60
Signed-off-by: Maleah Marks xxx@xxx.xxx


COMMENTS

author: Maleah Marks
date: 2016-11-03 11:02:57.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2016-11-03 11:03:03.000000000

Patch Set 8:

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

-------------------------------------
author: Brenden Conley
date: 2016-11-03 11:27:57.000000000

Patch Set 8: Verified+1

Build Successful 

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

-------------------------------------
author: Maleah Marks
date: 2016-11-03 12:20:34.000000000

Patch Set 8:

Thank you Thomas for taking the time to answer!

I will ask Andrey to test with a huge repo if he has time.
I don't think I'll bother Matthias with the CQ now, I think it can wait until we agree on merging this.

-------------------------------------
author: Maleah Marks
date: 2016-11-03 12:25:53.000000000

Patch Set 8:

Hello Andrey,

Could you please test this change-set that attempts to reintroduce logical model support in EGit on a huge git repo?
You'd need to check the preference 'Allow models to participate in synchronizations' since it's now off by default.
I tested it by adding a Thread.sleep in WorkingTreeIterator.isEntryIgnored but this is really not a satisactory test, so I'd really appreciate your feedback here so that we know if, at least, this new patch-set avoids the performance issue.

Thanks in advance!

-------------------------------------
author: Jayvion Booth
date: 2016-11-05 15:06:11.000000000

Patch Set 8:

> Hello Andrey,
 > 
 > Could you please test this change-set that attempts to reintroduce
 > logical model support in EGit on a huge git repo?
 > You'd need to check the preference 'Allow models to participate in
 > synchronizations' since it's now off by default.
 > I tested it by adding a Thread.sleep in WorkingTreeIterator.isEntryIgnored
 > but this is really not a satisactory test, so I'd really appreciate
 > your feedback here so that we know if, at least, this new patch-set
 > avoids the performance issue.
 > 
 > Thanks in advance!

Sorry for a delayed response. I will try to check this with my original setup next week. If you don't hear from me after a week from now, please ping me again, I have lot of other tasks which need my attention urgently.

-------------------------------------
author: Maleah Marks
date: 2016-11-07 07:34:38.000000000

Patch Set 8:

Andrey,

Thank you indeed for taking the time to answer. I hope you can find the time to test it this week but of course I understand you have more pressing matters to take care of. I'll ping you back if necessary, and thank you anyway!

-------------------------------------
author: Maleah Marks
date: 2016-11-15 08:56:20.000000000

Patch Set 8:

Hello Thomas,
As agreed last week, I ping you again and hope you can find the time to review this.
Andrey, any chance you could test this patch set on your huge repo to confirm whether the performance issue is resolved?

Thanks in advance everybody!

-------------------------------------
author: Jayvion Booth
date: 2016-11-16 08:58:38.000000000

Patch Set 8:

> Hello Andrey,
 > 
 > Could you please test this change-set that attempts to reintroduce
 > logical model support in EGit on a huge git repo?
 > You'd need to check the preference 'Allow models to participate in
 > synchronizations' since it's now off by default.
 > I tested it by adding a Thread.sleep in WorkingTreeIterator.isEntryIgnored
 > but this is really not a satisactory test, so I'd really appreciate
 > your feedback here so that we know if, at least, this new patch-set
 > avoids the performance issue.
 > 
 > Thanks in advance!

Hi Laurent,
this patch seem to work fine for me on our huge repo. Sorry I have no time to review the code, but at least I was not able to break or freeze the system by playing with this.
Regards,
Andrey

-------------------------------------
author: Maleah Marks
date: 2016-11-16 09:00:45.000000000

Patch Set 8:

Thank you Andrey!
I really appreciate that you took the time to check that, and I'm glad to hear that performance is now okay :)

-------------------------------------
author: Maleah Marks
date: 2016-11-16 09:10:50.000000000

Patch Set 8:

Andrey, just to be absolutely sure: Did you activate the preference 'Allow models to participate in synchronizations' when you tested this patch?
Because its value has changed so if you didn't set it explicitly you have tested without logical model support, and it wouldn't be what we want!

-------------------------------------
author: Jayvion Booth
date: 2016-11-16 09:21:50.000000000

Patch Set 8:

> Andrey, just to be absolutely sure: Did you activate the preference
 > 'Allow models to participate in synchronizations' when you tested
 > this patch?
 > Because its value has changed so if you didn't set it explicitly
 > you have tested without logical model support, and it wouldn't be
 > what we want!

Yes, I've noticed this and enabled this, but since I don't have any logical participant installed (I use plain SDK), this seemed not to have any negative effect (as expected).

-------------------------------------
author: Alayna Houston
date: 2016-11-20 10:25:05.000000000

Patch Set 8:

> Yes, I've noticed this and enabled this, but since I don't have any
 > logical participant installed (I use plain SDK), this seemed not to
 > have any negative effect (as expected).

So it seems we could leave the preference enabled by default?

-------------------------------------
author: Jayvion Booth
date: 2016-11-20 10:32:39.000000000

Patch Set 8:

Yep

-------------------------------------
author: Maleah Marks
date: 2016-11-21 08:29:17.000000000

Patch Set 8:

Hi guys, should I push a new patchset to revert the property to its former default value? Or wait until Thomas has time to review more thoroughly?

-------------------------------------
author: Alayna Houston
date: 2016-11-26 14:17:50.000000000

Patch Set 8: Code-Review+1

> Hi guys, should I push a new patchset to revert the property to its
 > former default value? Or wait until Thomas has time to review more
 > thoroughly?

Looks OK to me. Yes, please leave the property at its former default (true).

I'm too overloaded to do a full blown test with some non-trivial model provider, but I didn't notice any performance problems in my other usual tests. The code looks reasonable.

I don't know what to do about that CQ (more than 1000 changed lines). I've added Matthias as reviewer -- he'll know what to do.  Personally I suspect none might be needed since you're a committer at the EMF Compare project, and if the paperwork you and your employer signed is anything like mine, it covers contributions to "Eclipse" in general. But I'm not 100% sure.

-------------------------------------
author: Douglas Trujillo
date: 2016-11-26 22:38:25.000000000

Patch Set 8: Code-Review-1

(3 comments)

Line:114, org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/synchronize/MockLogicalResourceMapping.java -> why can we ignore exceptions here ?

Line:14, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/IgnoreInGitSynchronizations.java -> s/to to/to/

Line:205, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/DefaultGitSynchronizer.java -> style nit: missing braces

-------------------------------------
author: Douglas Trujillo
date: 2016-11-26 22:53:42.000000000

Patch Set 8:

(2 comments)

Line:14, org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/IgnoreInGitSynchronizations.java -> Done

Line:205, org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/DefaultGitSynchronizer.java -> Done

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-12-06 23:26:29.000000000

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

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