mirror of
https://github.com/go-gitea/gitea.git
synced 2026-12-03 21:32:25 -06:00
Follower and following lists, including the counts in the profile sidebar, filter private users through a `team_user` self-join that grows with the number of teams a signed-in viewer shares an org with. Use `org_user`, which holds the same memberships with one row per user and org. Median `GetUserFollowing` time in ms on synthetic data, before → after: | Viewer | SQLite | MySQL | PostgreSQL | |---|--:|--:|--:| | In 10 teams of a large org | 485 → 25 | 758 → 29 | 204 → 35 | | In 1 team of a large org | 23 → 13 | 0.6 → 0.6 | 13 → 8 | | In no team | 3.1 → 3.1 | 1.3 → 1.3 | 131 → 6.5 | | In 180 small orgs | 3.0 → 3.0 | 3.2 → 1.5 | 16 → 19 | Assisted-by: Claude Code:claude-opus-5-5