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 or projects that are shared, but not with EGit, implement
logic similar to RepositoryProvider.markAsUnshared() to cache
information on the mapping in a session property. Note: this works
because mapping a repository provider creates the session property
first, and we reset our own property whenever we do find a provider
in that session property (any one will do).

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

COMMENTS

author: Alayna Houston
date: 2016-01-19 07:17:58.000000000

Uploaded patch set 4.

-------------------------------------
author: Brenden Conley
date: 2016-01-19 07:38:18.000000000

Patch Set 4:

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

-------------------------------------
author: Brenden Conley
date: 2016-01-19 08:03:37.000000000

Patch Set 4: Code-Review-1

Build Unstable 

https://hudson.eclipse.org/egit/job/egit.gerrit/8037/ : UNSTABLE

-------------------------------------
author: Brenden Conley
date: 2016-01-19 08:11:27.000000000

Patch Set 4: -Code-Review

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

-------------------------------------
author: Brenden Conley
date: 2016-01-19 08:37:02.000000000

Patch Set 4: Verified+1

Build Successful 

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

-------------------------------------
author: Jayvion Booth
date: 2016-01-19 09:30:04.000000000

Patch Set 4: Code-Review+2

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

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

-------------------------------------
author: Alayna Houston
date: 2016-01-19 09:45:27.000000000

Patch Set 4:

(1 comment)

Line:331, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/util/ResourceUtil.java -> Comment is wrong. Should read

  Sets the session property xxx@xxx.xxx #PROVIDER_ID} to the given
  xxx@xxx.xxx providerId}.

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