1
1
mirror of https://github.com/go-gitea/gitea synced 2024-11-14 14:14:25 +00:00
gitea/routers
Rowan Bohde 7dcccc3bb1
improve performance of diffs (#32393)
This has two major changes that significantly reduce the amount of work
done for large diffs:

* Kill a running git process when reaching the maximum number of files
in a diff, preventing it from processing the entire diff.
* When loading a diff with the URL param `file-only=true`, skip loading
stats. This speeds up loading both hidden files of a diff and sections
of a diff when clicking the "Show More" button.

A couple of minor things from profiling are also included:

* Reuse existing repo in `PrepareViewPullInfo` if head and base are the
same.

The performance impact is going to depend heavily on the individual diff
and the hardware it runs on, but when testing locally on a diff changing
100k+ lines over hundreds of files, I'm seeing a roughly 75% reduction
in time to load the result of "Show More"

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-11-02 11:29:37 +08:00
..
api Fix missing signature key error when pulling Docker images with SERVE_DIRECT enabled (#32365) 2024-10-31 15:28:25 +00:00
common Refactor the DB migration system slightly (#32344) 2024-10-27 19:54:35 +08:00
install Save initial signup information for users to aid in spam prevention (#31852) 2024-09-09 17:05:16 -04:00
private Make git push options accept short name (#32245) 2024-10-12 05:42:10 +00:00
utils Refactor external URL detection (#29973) 2024-03-22 04:32:40 +08:00
web improve performance of diffs (#32393) 2024-11-02 11:29:37 +08:00
init.go Make oauth2 code clear. Move oauth2 provider code to their own packages/files (#32148) 2024-10-02 08:03:19 +08:00