gitea: Extremely slow performance with larger repositories
Description
My department has a repository about 500M in size (bare) and with around 40000 commits in flat history (we don’t use branches in that specific repository). It contains about 87000 files. Viewing is generally okay, but an attempt to create a pull request results in 2 minute wait between the button press and new pull request being loaded. In the background I see git rev-parse being run a lot.
I tried to reproduce the issue with the Linux Kernel repository (and I get it, THAT one is massive, with more than 4G of data and millions of commits). It took me a few minutes to wait for the repository page to even load, let alone create any pull requests.
I’m not sure it can be fixed, but maybe it is possible to load the pull request page after the press of a button and let the pull request to be created in background at least? It’s especially annoying since another press of a button will create another identical pull request and will take as long as the first one.
Gitea Version
1.16.5
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
From gitea.io
Database
SQLite
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 4
- Comments: 18 (14 by maintainers)
gitea doctor --run check-commit-graphs --fixWithout logs or some concrete test case we’re blind and we don’t know what needs to be improved.
OK @vdrandom upgrade git to the latest version and go in to gitea’s copy of the repo on the disk and run
git commit-graph write. (If you’re on dev/1.18 you can just rungitea doctor --run check-commit-graphs --fix.)git 1.8 is really old and will always be slow on big repos.
Big repos also need commit-graphs written. They should be being written now but old repos will not have them written.
It would be helpful to know exactly which urls are slow after you’ve done that. (But you must ensure you’re running a new version of git.)
If the slow urls are related to diffs you should adjust:
but tell us exactly which urls are slow.