A repo with more than 10000~ files takes long time to show the page #169

Closed
opened 2025-11-02 03:12:01 -06:00 by GiteaMirror · 22 comments
Owner

Originally created by @typeless on GitHub (Dec 27, 2016).

  • Gitea version (or commit ref):
$ ./gitea --version
Gitea version 6aacf4d
  • Git version:
$ git --version
git version 2.7.4
  • Operating system:
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="16.04.1 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.1 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

https://try.gitea.io/test/too-many-files

Description

mkdir too-many-files
cd too-many-files
for i in {1..10000}; do touch $i; done
git init
git add .
git commit -m "Initial commit"
git remote add origin https://try.gitea.io/test/too-many-files.git
git push -u origin master

Then use web browser to load the page.
...

P.S.

  1. It will eventually have a response, just taking very long time.
  2. If your server is set up with systemd, systemctl status gitea.service will show some interesting/strange phenomenon, which could be informative.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40418743-a-repo-with-more-than-10000-files-takes-long-time-to-show-the-page?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github).
Originally created by @typeless on GitHub (Dec 27, 2016). - Gitea version (or commit ref): ``` $ ./gitea --version Gitea version 6aacf4d ``` - Git version: ``` $ git --version git version 2.7.4 ``` - Operating system: ``` $ cat /etc/os-release NAME="Ubuntu" VERSION="16.04.1 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.1 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" ``` - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL) - [ ] No - [ ] Not relevant - Log gist: https://try.gitea.io/test/too-many-files ## Description ``` mkdir too-many-files cd too-many-files for i in {1..10000}; do touch $i; done git init git add . git commit -m "Initial commit" git remote add origin https://try.gitea.io/test/too-many-files.git git push -u origin master ``` Then use web browser to load the page. ... P.S. 1. It will eventually have a response, just taking very long time. 2. If your server is set up with systemd, `systemctl status gitea.service` will show some interesting/strange *phenomenon*, which could be informative. <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40418743-a-repo-with-more-than-10000-files-takes-long-time-to-show-the-page?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github). </bountysource-plugin>
GiteaMirror added the type/enhancementtype/bug labels 2025-11-02 03:12:01 -06:00
Author
Owner

@joubertredrat commented on GitHub (Dec 27, 2016):

Maybe pagination to prevent this?

@joubertredrat commented on GitHub (Dec 27, 2016): Maybe pagination to prevent this?
Author
Owner

@lunny commented on GitHub (Dec 28, 2016):

Ignore files after show some, this is also github does.

@lunny commented on GitHub (Dec 28, 2016): Ignore files after show some, this is also github does.
Author
Owner

@azlan commented on GitHub (Dec 28, 2016):

My repo doesn't have 10k files, but just 550 commits. Opening 'Commits' tab takes more than 2 seconds.

[Macaron] 2016-12-28 10:57:55: Completed /zxcv/MyRepo/commits/master 200 OK in 2.3113341s

@azlan commented on GitHub (Dec 28, 2016): My repo doesn't have 10k files, but just 550 commits. Opening 'Commits' tab takes more than 2 seconds. `[Macaron] 2016-12-28 10:57:55: Completed /zxcv/MyRepo/commits/master 200 OK in 2.3113341s`
Author
Owner

@typeless commented on GitHub (Dec 28, 2016):

@azlan Can you specify the details of the problem in another ticket ?

@typeless commented on GitHub (Dec 28, 2016): @azlan Can you specify the details of the problem in another ticket ?
Author
Owner

@lunny commented on GitHub (Dec 28, 2016):

I will check that

@lunny commented on GitHub (Dec 28, 2016): I will check that
Author
Owner

@metalmatze commented on GitHub (Dec 29, 2016):

Yes. Github just limits at 1000 files. I think that should be somewhat reasonable for a web UI, you can always check out locally or know what you're looking for an change the url, maybe use a search too. Idk how practical pagination might be for that. I don't see a real value in browsing thousands of files through pagination.

@metalmatze commented on GitHub (Dec 29, 2016): Yes. Github just limits at 1000 files. I think that should be somewhat reasonable for a web UI, you can always check out locally or know what you're looking for an change the url, maybe use a search too. Idk how practical pagination might be for that. I don't see a real value in browsing thousands of files through pagination.
Author
Owner

@lunny commented on GitHub (Dec 29, 2016):

So we could also limits at 1000 files to fix this issue.

@lunny commented on GitHub (Dec 29, 2016): So we could also limits at 1000 files to fix this issue.
Author
Owner

@bkcsoft commented on GitHub (Dec 29, 2016):

@lunny maybe add pagination in the future?

@bkcsoft commented on GitHub (Dec 29, 2016): @lunny maybe add pagination in the future?
Author
Owner

@bkcsoft commented on GitHub (Dec 29, 2016):

or at least some kind of lazy-loading (Press here to load more)

@bkcsoft commented on GitHub (Dec 29, 2016): or at least some kind of lazy-loading (`Press here to load more`)
Author
Owner

@lunny commented on GitHub (Dec 30, 2016):

That's another issues. Currently we have to limit 1000 files just like Github to fix this one.

@lunny commented on GitHub (Dec 30, 2016): That's another issues. Currently we have to limit 1000 files just like Github to fix this one.
Author
Owner

@bkcsoft commented on GitHub (Dec 30, 2016):

This seems related as well: https://github.com/gogits/gogs/issues/3022 (see https://github.com/gogits/gogs/issues/3094 for reference)

@bkcsoft commented on GitHub (Dec 30, 2016): This seems related as well: https://github.com/gogits/gogs/issues/3022 (see https://github.com/gogits/gogs/issues/3094 for reference)
Author
Owner

@tboerger commented on GitHub (Jan 16, 2017):

We got this kind of issue multiple times now.

@tboerger commented on GitHub (Jan 16, 2017): We got this kind of issue multiple times now.
Author
Owner

@lunny commented on GitHub (Feb 24, 2017):

I will move this to v1.2 since there is no PR to fix this.

@lunny commented on GitHub (Feb 24, 2017): I will move this to v1.2 since there is no PR to fix this.
Author
Owner

@tycho commented on GitHub (Mar 4, 2017):

Since gitea seems to be the future of gogs, and the gogs issue is basically dead... any commentary on the proposed solution in the original post of https://github.com/gogits/gogs/issues/3022?

@tycho commented on GitHub (Mar 4, 2017): Since gitea seems to be the future of gogs, and the gogs issue is basically dead... any commentary on the proposed solution in the original post of https://github.com/gogits/gogs/issues/3022?
Author
Owner

@lunny commented on GitHub (Mar 4, 2017):

This should be fixed on v1.2

@lunny commented on GitHub (Mar 4, 2017): This should be fixed on v1.2
Author
Owner

@tycho commented on GitHub (Mar 4, 2017):

I'm not asking when it will be fixed, but rather how.

@tycho commented on GitHub (Mar 4, 2017): I'm not asking when it will be fixed, but rather how.
Author
Owner

@lunny commented on GitHub (Mar 4, 2017):

Just like github, will limit the numbers shown in the UI.

@lunny commented on GitHub (Mar 4, 2017): Just like github, will limit the numbers shown in the UI.
Author
Owner

@tycho commented on GitHub (Mar 4, 2017):

Have a diff?

@tycho commented on GitHub (Mar 4, 2017): Have a diff?
Author
Owner

@lunny commented on GitHub (Oct 13, 2017):

This is the files page, not commits page. Commits page has paginate.

@lunny commented on GitHub (Oct 13, 2017): This is the files page, not commits page. Commits page has paginate.
Author
Owner

@JeffreyLeeSpokeo commented on GitHub (Oct 13, 2017):

I see sorry that was my mistake. For some reason I thought it mean like 1000 of files and/or commits in a PR. I deleted my comment

@JeffreyLeeSpokeo commented on GitHub (Oct 13, 2017): I see sorry that was my mistake. For some reason I thought it mean like 1000 of files and/or commits in a PR. I deleted my comment
Author
Owner

@stale[bot] commented on GitHub (Jan 20, 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 20, 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

@typeless commented on GitHub (Jan 21, 2019):

This has been fixed.

@typeless commented on GitHub (Jan 21, 2019): This has been fixed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#169