gerrit/gerrit-httpd
Christian Grail 52b7f60f3d Optimized "IncludedIn" Algorithm
The most expensive part of the "IncludedIn" calculation is the
processing of paths which do not contain the requested commit. In that
case the processor needs to look at all reachable commits starting from
the tip commit to the initial commit. The method RevWalk.isMergedIn()
walks over the whole parent graph again and again for each tag and each
branch. The amount of walks can be reduced by sorting the tags and
branches and start bottom up. This allows ignoring subgraphs where the
commit is not contained in subsequent iterations and stop graph
traversal when a tag or branch is reached where we already know that it
contains the commit.

Performance measurement on larger Git repositories, like Linux Kernel,
indicate that the runtime with the new algorithm is three to four times
faster.

To be able to expose the "IncludedIn" calculation as a REST service or
SSH command I have extracted the algorithm into an own class in the
gerrit-server package.

Change-Id: I56b32a77e02e47dd31ec6ce4adfe0a781e73a76c
Signed-off-by: Christian Grail <christian.grail@sap.com>
2013-09-16 08:19:35 +00:00
..
.settings Remove timestamp from all org.eclipse.core.resources.prefs files. 2012-07-04 14:06:09 +02:00
src Optimized "IncludedIn" Algorithm 2013-09-16 08:19:35 +00:00
.gitignore Add Intellij IDEA files to ignore list 2012-05-03 13:17:43 -07:00
BUCK Make source JARs for {extension,plugin}-api targets 2013-05-30 14:27:59 -07:00