Compare changes and new pull requests take a very long time. #1204

Closed
opened 2025-11-02 03:52:19 -06:00 by GiteaMirror · 18 comments
Owner

Originally created by @MsBuggy on GitHub (Nov 3, 2017).

  • Gitea version (or commit ref): 1.2 windows-amd64
  • Git version: 2.11.0 windows
  • Operating system: windows 2008 R2 16 CPU cores and 16GB RAM
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I try to create pull requests and the 'compare changes' step takes 10 minutes! Create pull requests make the browser crashed!

Originally created by @MsBuggy on GitHub (Nov 3, 2017). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.2 windows-amd64 - Git version: 2.11.0 windows - Operating system: windows 2008 R2 _16 CPU cores and 16GB RAM_ - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description I try to create pull requests and the 'compare changes' step takes 10 minutes! Create pull requests make the browser crashed!
Author
Owner

@lflare commented on GitHub (Nov 3, 2017):

How big of a repository are we talking about here? Do you have any logs?

@lflare commented on GitHub (Nov 3, 2017): How big of a repository are we talking about here? Do you have any logs?
Author
Owner

@webjoel commented on GitHub (May 15, 2018):

In my case is a little slow too, repo is very big, an solution is add gauge/loading image for feedback to user. It's possible?

If yes, is good add too in apply merge pull request, what is very slow too e no exixsts feedback to user, only the loading in the browser title.

My repo size is: 1,8 GB.

Issue related: #601

@webjoel commented on GitHub (May 15, 2018): In my case is a little slow too, repo is very big, an solution is add gauge/loading image for feedback to user. It's possible? If yes, is good add too in apply merge pull request, what is very slow too e no exixsts feedback to user, only the loading in the browser title. My repo size is: 1,8 GB. Issue related: #601
Author
Owner

@adelowo commented on GitHub (Dec 2, 2018):

I am currently experiencing this too on a project with a size of 146MB. :)

@adelowo commented on GitHub (Dec 2, 2018): I am currently experiencing this too on a project with a size of `146MB`. :)
Author
Owner

@lunny commented on GitHub (Dec 2, 2018):

@adelowo maybe you can send a pull request.

@lunny commented on GitHub (Dec 2, 2018): @adelowo maybe you can send a pull request.
Author
Owner

@adelowo commented on GitHub (Dec 2, 2018):

@lunny I will try to take a look at it in the coming week hopefully.

By the way, mine takes 3 -5 minutes without causing a browser crash

@adelowo commented on GitHub (Dec 2, 2018): @lunny I will try to take a look at it in the coming week hopefully. By the way, mine takes 3 -5 minutes without causing a browser crash
Author
Owner

@stale[bot] commented on GitHub (Jan 31, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Jan 31, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@lunny commented on GitHub (Feb 6, 2019):

@MsBuggy @webjoel @adelowo is this still a problem?

@lunny commented on GitHub (Feb 6, 2019): @MsBuggy @webjoel @adelowo is this still a problem?
Author
Owner

@webjoel commented on GitHub (Feb 6, 2019):

@lunny I am using an old version (commit 1b2aff0), I have not yet been able to upgrade to the latest version, so I'm not sure if the problem persists in the new ones, but in this one I'm using the slowness continues.

@webjoel commented on GitHub (Feb 6, 2019): @lunny I am using an old version (commit 1b2aff0), I have not yet been able to upgrade to the latest version, so I'm not sure if the problem persists in the new ones, but in this one I'm using the slowness continues.
Author
Owner

@adelowo commented on GitHub (Feb 6, 2019):

@lunny I no longer have access to the repository so I will not be able to test that

@adelowo commented on GitHub (Feb 6, 2019): @lunny I no longer have access to the repository so I will not be able to test that
Author
Owner

@zeripath commented on GitHub (Feb 6, 2019):

Ok that Gitea version is before the substantial speed up pr #4921 @Typeless made was pulled.

@zeripath commented on GitHub (Feb 6, 2019): Ok that Gitea version is before the substantial speed up pr #4921 @Typeless made was pulled.
Author
Owner

@webjoel commented on GitHub (Feb 6, 2019):

@lunny @lafriks Is it possible for this PR ( #4921 ) to inner in 1.7.x release? Or is it only 1.8?

Anyway, for me can close this issue, since other related issues were also closed, so the best should have generated performance gain.

@webjoel commented on GitHub (Feb 6, 2019): @lunny @lafriks Is it possible for this PR ( #4921 ) to inner in 1.7.x release? Or is it only 1.8? Anyway, for me can close this issue, since other related issues were also closed, so the best should have generated performance gain.
Author
Owner

@lafriks commented on GitHub (Feb 6, 2019):

@webjoel only bug fixes are backported

@lafriks commented on GitHub (Feb 6, 2019): @webjoel only bug fixes are backported
Author
Owner

@1902sysad commented on GitHub (Aug 8, 2019):

im having this issue, is there any workarounds?

@1902sysad commented on GitHub (Aug 8, 2019): im having this issue, is there any workarounds?
Author
Owner

@typeless commented on GitHub (Aug 8, 2019):

I encountered this a couple of times. I tried to sample the timings with ps -u git -o cmd manually and got

CWD CMD
-   /volume1/homes/git/gitea/gitea web
-   /bin/git -c credential.helper= -c protocol.version=2 -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= remote add -f 1565248623376910366 /volume1/homes/git/gitea/repositories/saturn/large-repo.git
-   /var/packages/Git/target/libexec/git-core/git fetch 1565248623376910366
-   git-upload-pack /volume1/homes/git/gitea/repositories/saturn/large-repo.git
-   /var/packages/Git/target/libexec/git-core/git rev-list --objects --stdin --not --all --quiet

I guess git remote add -f is probably the one taking long time.

@typeless commented on GitHub (Aug 8, 2019): I encountered this a couple of times. I tried to sample the timings with `ps -u git -o cmd` manually and got ``` CWD CMD - /volume1/homes/git/gitea/gitea web - /bin/git -c credential.helper= -c protocol.version=2 -c filter.lfs.required= -c filter.lfs.smudge= -c filter.lfs.clean= remote add -f 1565248623376910366 /volume1/homes/git/gitea/repositories/saturn/large-repo.git - /var/packages/Git/target/libexec/git-core/git fetch 1565248623376910366 - git-upload-pack /volume1/homes/git/gitea/repositories/saturn/large-repo.git - /var/packages/Git/target/libexec/git-core/git rev-list --objects --stdin --not --all --quiet ``` I guess `git remote add -f` is probably the one taking long time.
Author
Owner

@typeless commented on GitHub (Aug 8, 2019):

Looking into it further, that should be at 1608f63e39/modules/git/repo_compare.go (L55)

@typeless commented on GitHub (Aug 8, 2019): Looking into it further, that should be at https://github.com/go-gitea/gitea/blob/1608f63e396c78bcbea3605b812556ddf441a6c4/modules/git/repo_compare.go#L55
Author
Owner

@typeless commented on GitHub (Aug 8, 2019):

A quick workaround, I assume, is to decouple git remote add and git fetch.
And then make git fetch fetch only the branch in question, not all the other refs.

@typeless commented on GitHub (Aug 8, 2019): A quick workaround, I assume, is to decouple `git remote add` and `git fetch.` And then make `git fetch` fetch only the branch in question, not all the other refs.
Author
Owner

@typeless commented on GitHub (Aug 8, 2019):

@1902sysad Hey, if you know how to build Gitea from source, please try https://github.com/go-gitea/gitea/pull/7797/files to see if it fixes your problem.

@typeless commented on GitHub (Aug 8, 2019): @1902sysad Hey, if you know how to build Gitea from source, please try https://github.com/go-gitea/gitea/pull/7797/files to see if it fixes your problem.
Author
Owner

@1902sysad commented on GitHub (Aug 8, 2019):

Thank you we will be trying this soon

@1902sysad commented on GitHub (Aug 8, 2019): Thank you we will be trying this soon
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1204