RepositoryChangeScanner should not query all repos if UI is not active
commit4261f46ab267250679b98a21b1c98dfb3b96f1ba
authorAndrey Loskutov <loskutov@gmx.de>
Sat, 14 Jan 2017 08:59:51 +0000 (14 09:59 +0100)
committerAndrey Loskutov <loskutov@gmx.de>
Sat, 14 Jan 2017 08:59:51 +0000 (14 09:59 +0100)
tree3782491daa196e0f9915450fadb5065e7cc1a45e
parentcefb94f242e015aec561edda2990af011335a61d
RepositoryChangeScanner should not query all repos if UI is not active

Change the order of conditions in RepositoryChangeScanner: first, check
if we must run at all and only after that query if we have repositories
via repositoryCache.getAllRepositories(). This avoids unneeded file I/O
for workspaces with lot of repositories.

Change-Id: I337236e770222d1dbe192ea5f41b8d450b43508e
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/Activator.java