"Edit" button in a 1000-file diff is slow
I noticed that in a diff with 1000+ files, we render the "Edit" button 1000 times:
Not only is this slow because need to check whether each file is text, but we also double check that the blob exists for the commit.
Do we really need this "Edit" button? Should we just omit the button entirely from the diff view? Other ideas:
- We could skip the existence check until a user clicks on the button
- If the diff is > N (e.g. 10) files, just hide it.
Relates to gitlab-foss#20444 (closed).
/cc: @smcgivern, @yorickpeterse, @pacoguzman