git-filter-repo/t
Elijah Newren 85c8e3660d filter-repo: accelerate is_ancestor() for --analyze mode
The --analyze mode was extremely slow for the freebsd/freebsd repo on
github; digging in, the is_ancestor() function was being called a huge
number of times -- about 22 times per commit on average (and about 17
million times overall).  The analyze mode uses is_ancestor() to
determine whether a rename equivalency class should be broken (i.e.
renaming A->B mean all versions of A and B are just different versions
of the same file, but if someone adds a new A in some commit which
contains the A->B rename in its history then this equivalence class no
longer holds).  Each is_ancestor() call potentially has to walk a tree
of dependencies all the way back to a sufficient depth where it can
realize that the commit cannot be an ancestor; this can be a very long
walk.

We can speed this up by keeping track of some previous is_ancestor()
results.  If commit F is not an ancestor of commit G, then F cannot be
an ancestor of children of G (unless that child has multiple parents;
but even in that case F can only be an ancestor through one of the
parents other than G).  Similarly, if F is an ancestor of commit G, then
F will always be an ancestor of any children of G.  Cache results from
previous calls to is_ancestor() and use them to accelerate subsequent
calls.

Signed-off-by: Elijah Newren <newren@gmail.com>
2020-02-07 18:04:53 -08:00
..
t9390 filter-repo: add new --no-ff option 2020-01-01 10:49:56 -08:00
t9391 filter-repo: consistently use bytestrings for directory names 2019-10-21 09:09:23 -07:00
run_coverage run_coverage: prefer coverage3 to python3-coverage 2019-11-21 16:19:26 -08:00
t9390-filter-repo.sh filter-repo: accelerate is_ancestor() for --analyze mode 2020-02-07 18:04:53 -08:00
t9391-filter-repo-lib-usage.sh filter-repo: consistently use bytestrings for directory names 2019-10-21 09:09:23 -07:00
t9392-python-callback.sh filter-repo (python3): replace strings with bytestrings 2019-05-08 08:57:51 -07:00
test-lib-functions.sh filter-repo: add some basic tests, with git-style test-lib.sh 2019-03-12 14:19:38 -07:00
test-lib.sh filter-repo: add some basic tests, with git-style test-lib.sh 2019-03-12 14:19:38 -07:00