DESCRIPTION

Minimize accessing the persistent property for the GitProvider

Accessing persistent properties may be expensive, and may block if
other threads manipulate the same persistent property bucket. (For
instance, JDT initialization does set persistent properties for source
attachments.)

Therefore, if we didn't find a GitProvider through the session property,
let's first check whether the project is already scheduled for mapping
in the MappingJob. If so, we do know:

* the project is indeed a Git project (some thread tested the persistent
  property already), and
* we don't need to test the persistent property again, and
* we don't need to try to schedule the project for mapping again.

This should significantly reduce the number of accesses to that
persistent property for projects that indeed have a GitProvider.

To reduce the number of persistent property accesses for unshared
projects, re-implement part of the corresponding logic in
RepositoryProvider, which is unfortunately private. Note: this works
because mapping a repository provider creates the session property
first, and we reset our own "marked as unshared" property whenever we
do find a provider (any one will do).

Change-Id: I5272b0676921f7a6d59ca2445b5762e7b747a13c
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Alayna Houston
date: 2016-01-19 05:56:21.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-01-19 05:56:27.000000000

Patch Set 1:

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

-------------------------------------
author: Alayna Houston
date: 2016-01-19 06:02:30.000000000

Patch Set 1:

With a workspace containing 46 projects (EGit + JGit, plus a few test projects), having the Git toolbar and global menu enabled, and having a source from egit.core open in an editor, this drastically reduces the number of accesses to the persistent property during Eclipse startup.

With this change, I get exactly 46 accesses, as expected: one per project.

Without this change, I get 1135 accesses!

So this should significantly reduce contention for persistent property buckets, reduce the potential for blocking on that property access, and improve in general Eclipse startup.

-------------------------------------
author: Brenden Conley
date: 2016-01-19 06:25:13.000000000

Patch Set 1: Verified+1

Build Successful 

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

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-01-19 09:30:11.000000000

Change has been successfully merged into the git repository by Jayvion Booth

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