Remove DiffStats RPC call on initial render
We need to remove the DiffStats RPC call to Gitaly on initial Rapid Diffs render with the document. This call is expensive and can slow down the page.
Instead we should:
- Improve whitespace-only diff detection without relying on DiffStats. That's going to be possible once we have that flag in Gitaly
- Use FindChangedPaths RPC, which returns modified paths and is very fast. Since we only need to know the amount of changed files on initial render we could use that call instead
Edited by Stanislav Lashmanov