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

Performance issue on adding user to team #8479

Closed
2 of 7 tasks
davidsvantesson opened this issue Oct 12, 2019 · 1 comment
Closed
2 of 7 tasks

Performance issue on adding user to team #8479

davidsvantesson opened this issue Oct 12, 2019 · 1 comment
Labels
type/enhancement An improvement of existing functionality

Comments

@davidsvantesson
Copy link
Contributor

  • Gitea version (or commit ref): 1.9.4 (also 1.10.0+dev-414-gf1fdd782d)
  • Git version: not relevant
  • Operating system: ubuntu 18.04
  • 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

With the combination of many users and many repositories in a team, it can take very long time to add a single new team member. Example adding one user to team with ~100 members x 100 repositories: 160 seconds.

When adding a new team members the function recalculateTeamAccesses is run over all team's repositories. This function has to go through all collaborators and teams for the repository. So the time for adding a repository is something in the order of O(teams:users*repositories). It should be possible to only recalculate the access of the specific user that was added (or deleted) to the team for each repository, only giving O(repositories).

@zeripath zeripath added type/refactoring Existing code has been cleaned up. There should be no new functionality. type/enhancement An improvement of existing functionality and removed type/refactoring Existing code has been cleaned up. There should be no new functionality. labels Oct 13, 2019
@jolheiser
Copy link
Member

Fixed by #8481

@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/enhancement An improvement of existing functionality
Projects
None yet
Development

No branches or pull requests

4 participants