Files
gitea-MIRROR/models
silverwind 16070126c3 perf: use org_user for follower visibility (#40452)
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
2026-11-28 11:02:31 +00:00
..
2026-11-26 10:50:01 +00:00
2026-11-26 10:50:01 +00:00
2026-11-26 10:50:01 +00:00