DESCRIPTION

Improve performance of SelectionUtils.getRepository()

Instead of converting selected elements to an IPath location always
and then using RepositoryMapping.getRepository(IPath), try to keep as
much info as needed and as possible: if the selection contains
IResources, keep them and use the more efficient
RepositoryMapping.getRepository(IResource).

In my tests on a test workspace with 46 open projects and the git
toolbar and global menu enabled, this results in a speedup of the
SelectionUtils.getRepository(IStructuredSelection) operation by a
factor of about 10 in many cases.

This could be optimized a little bit more if we could, instead of using
IResources, collect only their containing IProjects and then use
RepositoryMapping.getProject(), but I'm currently unsure whether that
would actually be correct. See the review comments at
https://git.eclipse.org/r/#/c/65510/ .

Bug: 486857
Change-Id: Ied35b304c8496c501dbf8109e1c8d5403b962efb
Signed-off-by: Alayna Houston xxx@xxx.xxx

COMMENTS

author: Douglas Trujillo
date: 2016-02-19 23:06:40.000000000

Uploaded patch set 7: Patch Set 6 was rebased.

-------------------------------------
author: Douglas Trujillo
date: 2016-02-19 23:28:20.000000000

Patch Set 7: Code-Review+2

-------------------------------------
author: Brenden Conley
date: 2016-02-19 23:31:56.000000000

Patch Set 7:

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

-------------------------------------
author: Brenden Conley
date: 2016-02-19 23:37:14.000000000

Patch Set 7: Verified-1

Build Failed 

https://hudson.eclipse.org/egit/job/egit.gerrit/8145/ : FAILURE

-------------------------------------
author: Brenden Conley
date: 2016-02-20 00:04:28.000000000

Patch Set 7: -Verified

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

-------------------------------------
author: Brenden Conley
date: 2016-02-20 00:29:04.000000000

Patch Set 7: Verified+1

Build Successful 

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

-------------------------------------
author: Gerrit Johnathan Pham
date: 2016-02-20 09:41:41.000000000

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

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