When having big PRs with a lot of changed files or changed lines, Orbit will be unresponsive because of the diff view that is being rendered at the bottom of the detailed view. We should only render that whole diff section content when we are sure it wont cause performance problems.
I see two things to improve:
- Files with a lot of lines / changes (where we can assume it is something like a package-lock.json) or a lot of bytes (where we can assume it is a binary file) should not be rendered in the diff view / their changed lines should not be shown. Check with diff2html library that we use if this already has a function to accomplish that. If it has, try to use their stuff first, otherwise implement a SIMPLE logic here and inform the user that there are changed files (their names/pahs) but they will not be shown as a diff and why that is, in German).
- When a diff has a lof of changed files (50+), do not show the content of the diff view and instead inform the user that a diff view can not be shown as there are too many changed files.
When having big PRs with a lot of changed files or changed lines, Orbit will be unresponsive because of the diff view that is being rendered at the bottom of the detailed view. We should only render that whole diff section content when we are sure it wont cause performance problems.
I see two things to improve: