DESCRIPTION

Lessen the re-indexing work and number of queued jobs

Do not queue jobs unnecessarily and eliminate some unneeded jobs. As it
turns out, this is mostly a cosmetic problem.

The jobs have a potentially long initialization where they just lessen
the risk of executing in parallel with other heavy jobs. During this
period we may still cancel previous jobs just to queue a new one,
getting a huge queue of jobs. For the full re-indexing jobs, we can just
ignore re-indexing since the first one will do all necessary work.

Also acknowledge the fact the full re-indexing job does all work that an
incremental indexing job does and therefore we can skip launching an
incremental indexing job if a full reindexing operation is imminent (in
locking phase).

Finally reduce the total number of re-indexing jobs for all repositories
to two. Two or three seems to be a general practical limit for how many
jobs can be run in parallel without losing performance due to trashing.

Bug: 381856
Change-Id: I22f3d831a085bb6a9b2fdce79e17996b7f6f6761


COMMENTS

author: Juliet Cantu
date: 2013-03-17 23:19:41.000000000

Uploaded patch set 3.

-------------------------------------
author: Brenden Conley
date: 2013-03-17 23:19:47.000000000

Patch Set 3:

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

-------------------------------------
author: Brenden Conley
date: 2013-03-17 23:33:47.000000000

Patch Set 3: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/egit.gerrit/4282/ : SUCCESS

-------------------------------------
author: Shaylee Bautista
date: 2013-03-18 11:28:29.000000000

Patch Set 3: (1 inline comment)



Line:265, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/IndexDiffCacheEntry.java -> If you want this iteration to be thread safe you need to hold the lock on updateJobs.

-------------------------------------
author: Juliet Cantu
date: 2013-03-23 22:30:14.000000000

Patch Set 3: (2 inline comments)



Line:265, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/IndexDiffCacheEntry.java -> Done

Line:269, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/indexdiff/IndexDiffCacheEntry.java -> Must unlock, always.
done

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