Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 of 6 tasks
typeless opened this issue Dec 27, 2016 · 22 comments
Closed
2 of 6 tasks

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

typeless opened this issue Dec 27, 2016 · 22 comments
Labels
type/bug type/enhancement An improvement of existing functionality
Milestone

Comments

@typeless
Copy link
Contributor

typeless commented 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).
@typeless typeless changed the title A repo with more than 10000~ files can cause DoS A repo with more than 10000~ files takes long time to show the page Dec 27, 2016
@lunny lunny added this to the 1.1.0 milestone Dec 27, 2016
@joubertredrat
Copy link
Contributor

Maybe pagination to prevent this?

@lunny
Copy link
Member

lunny commented Dec 28, 2016

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

@lunny lunny added type/bug type/enhancement An improvement of existing functionality labels Dec 28, 2016
@azlan
Copy link

azlan commented 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

@typeless
Copy link
Contributor Author

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

@lunny
Copy link
Member

lunny commented Dec 28, 2016

I will check that

@metalmatze
Copy link
Contributor

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.

@lunny
Copy link
Member

lunny commented Dec 29, 2016

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

@bkcsoft
Copy link
Member

bkcsoft commented Dec 29, 2016

@lunny maybe add pagination in the future?

@bkcsoft
Copy link
Member

bkcsoft commented Dec 29, 2016

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

@lunny
Copy link
Member

lunny commented Dec 30, 2016

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

@bkcsoft
Copy link
Member

bkcsoft commented Dec 30, 2016

This seems related as well: gogs/gogs#3022 (see gogs/gogs#3094 for reference)

@tboerger
Copy link
Member

We got this kind of issue multiple times now.

@lunny
Copy link
Member

lunny commented Feb 24, 2017

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

@lunny lunny modified the milestones: 1.2.0, 1.1.0 Feb 24, 2017
@tycho
Copy link

tycho commented 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 gogs/gogs#3022?

@lunny
Copy link
Member

lunny commented Mar 4, 2017

This should be fixed on v1.2

@tycho
Copy link

tycho commented Mar 4, 2017

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

@lunny
Copy link
Member

lunny commented Mar 4, 2017

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

@tycho
Copy link

tycho commented Mar 4, 2017

Have a diff?

@lunny
Copy link
Member

lunny commented Oct 13, 2017

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

@JeffreyLeeSpokeo
Copy link

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

@stale
Copy link

stale bot commented 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 stale bot added the issue/stale label Jan 20, 2019
@typeless
Copy link
Contributor Author

This has been fixed.

@lafriks lafriks modified the milestones: 1.x.x, 1.8.0 Jan 21, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/bug type/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

10 participants