Add a GetAllNotes method to the Repo interface. This reads the
contents for all git-notes under the given ref in a single batch
operation. This is faster than the old method because we only
shell out to the git command a fixed number of times rather than
doing so repeatedely for every single review.
When checking each review to see if it has been submitted, cache
the set of commits reachable from each target ref, and use that
for determining submitted status. This saves us from having to
reperform the (linear) scan of the git history for every review.
With these changes, listing the reviews for the git-appraise repo
drops from taking ~2 seconds to ~0.15 seconds.
For one particular test repo, with 15k reviews, this drops the list
latency from 48 minutes to 6 seconds.
GetAllNotes
method to the Repo interface. This reads the contents for all git-notes under the given ref in a single batch operation. This is faster than the old method because we only shell out to the git command a fixed number of times rather than doing so repeatedely for every single review.With these changes, listing the reviews for the git-appraise repo drops from taking ~2 seconds to ~0.15 seconds.
For one particular test repo, with 15k reviews, this drops the list latency from 48 minutes to 6 seconds.