problem: don't render large compare diff #12391
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Does your problem still exist on the latest Forgejo version?
Yes, the problem still exists (tested locally with the latest development version)
About your usage of Forgejo
Contributor of Forgejo
Member of the Forgejo security team.
Self-hosts Forgejo.
Co-Maintainer of Codeberg.org's Forgejo instance.
Problem description
This is issue was created as part of https://floss.social/@forgejo/116494296646568723.
Large diffs can be rendered via the compare endpoint, https://codeberg.org/forgejo/forgejo/compare/HEAD..HEAD~1. At some point they are so large that syntax highlighting them takes a lot of CPU time and the browser usually can't handle so much HTML either.
There should be a limit where with X amount of files or lines the diff is not rendered or pagination is implemented like for pull request files.
Potential workarounds
Forgejo Version
N/A
Other details about your environment (software names and versions)
N/A
Solutions
Accepted solutions to address this problem will go here
I run into mini-versions of this often if I perform a manual backport of a Forgejo PR. When creating a new pull request, the base branch needs to be changed to the backport branch (eg. change
forgejotov15.0/forgejo), but to accomplish that I need to load the compare screen first and it's overly long and irrelevant at the initial load time.Maintaining functionality of the top form to change the base branch would be important in fixing this, to maintain the ability to create such backport PRs without manual URL editing.