Use git diff --stat as possible optimization for changeset diff stats
Created by: mrnugget
To compute the diff stats for a campaign we currently:
- make N requests to
gitserver(N = number of changesets in a campaing) to get the full diff for each changset - parse each diff to get the diff stats
- add up the diff stats
What we could do as an optimization is to ask gitserver for the diff stat directly.
This call to DiffStat
ends up making the request to gitserver here:
We could, for example, have a method on fileDiffConnectionResolver, called ComputeDiffStatOnly, that makes nearly the same request to gitserver, except that it adds the --stat flag to the git diff command and parses that output.
Or we can use --numstat or --shortstat.