jgit/org.eclipse.jgit/.settings
Terry Parker dbd05433ec Move reachability checker generation into the ObjectReader object
Reachability checkers are retrieved from RevWalk and ObjectWalk objects:
* RevWalk.createReachabilityChecker()
* ObjectWalk.createObjectReachabilityChecker()

Since RevWalks and ObjectWalks are themselves directly instantiated
in hundreds of places (e.g. UploadPack...) overriding them in a
consistent way requires overloading 100s of methods, which isn't
feasible. Moving reachability checker generation to a more central
place solves that problem.

The ObjectReader object seems a good place from which to get
reachability checkers, because reachability checkers return
information about relationships between objects. ObjectDatabases
delegate many operations to ObjectReaders, and reachability bitmaps
are attached to ObjectReaders.

The Bitmapped and Pedestrian reachability checker objects were
package private in the org.eclipse.jgit.revwalk package. This change
makes them public and moves them to the
org.eclipse.jgit.internal.revwalk package. Corresponding tests are
also moved.

Motivation:
1) Reachability checking algorithms need to scale. One of the
   internal Android repositories has ~2.4 million refs/changes/*
   references, causing bad long tail performance in reachability
   checks.
2) Reachability check performance is impacted by repository
   topography: number of refs, number of objects, amounts of
   related vs. unrelated history.
3) Reachability check performance is also affected by per-branch
   access (Gerrit branch permissions) since different users can
   see different branches.
4) Reachability check performance isn't affected by any state in a
   RevWalk or ObjectWalk.

I don't yet know if a single algorithm will work for all cases in #2
and #3. We may need to evolve the ReachabilityChecker interfaces
over time to solve the Gerrit branch permissions case, or use
Gerrit-specific identity information to solve that in an efficient
way.

This change takes the existing public API and moves it to the
ObjectReader/whole repository level, which is where we can do
consistent customizations for #2 and #3. We intend to upstream the
best of whatever works, but anticipate the need for multiple rounds
of experimentation.

Change-Id: I9185feff43551fb387957c436112d5250486833d
Signed-off-by: Terry Parker <tparker@google.com>
2021-01-28 22:17:26 -08:00
..
.api_filters Move reachability checker generation into the ObjectReader object 2021-01-28 22:17:26 -08:00
org.eclipse.core.resources.prefs Initial JGit contribution to eclipse.org 2009-09-29 16:47:03 -07:00
org.eclipse.core.runtime.prefs Fix line endings 2010-06-18 23:36:18 +02:00
org.eclipse.jdt.core.prefs Enable and fix "Statement unnecessarily nested within else clause" warnings 2019-10-17 10:20:14 +09:00
org.eclipse.jdt.ui.prefs Partially revert c0ad77d8 "Enhance Eclipse save actions" 2017-08-30 03:07:18 +02:00
org.eclipse.mylyn.tasks.ui.prefs Use commit message best practices for Mylyn Commit template 2011-09-05 23:57:21 +02:00
org.eclipse.mylyn.team.ui.prefs Fix Mylyn commit message template 2018-09-23 04:11:58 -04:00
org.eclipse.pde.api.tools.prefs Ignore warning for minor version change without API change 2017-11-24 01:12:14 +01:00
org.eclipse.pde.core.prefs Adding PDE API Tools nature to JGit 2010-01-16 10:00:30 -06:00