Skip to content

Fetch a member's organizations in one call - #158

Merged
vitramir merged 1 commit into
mainfrom
fetch-the-organizations-in-one-call
Aug 29, 2026
Merged

Fetch a member's organizations in one call#158
vitramir merged 1 commit into
mainfrom
fetch-the-organizations-in-one-call

Conversation

@vitramir

Copy link
Copy Markdown
Contributor

OrganizationContext resolved the caller's organizations with one GetOrganization per membership. On an installation where the account belongs to 244 organizations, a single console session issued 1213 of them — the fanout repeats whenever the membership list grows a page — and the page becomes unresponsive while they drain.

Found while tracing an unrelated e2e failure: the test's page had stopped issuing any requests of its own, and the trace showed what it was busy with instead.

ListAccessibleOrganizations answers the same question in one call. Same data, same shape into mapOrganizations; the per-membership id list it used to build is gone with it.

They were asked for one at a time. A member of a few hundred opened the
console on a few hundred requests, repeated whenever the membership list
grew a page -- more than a thousand on the installation this was found
on -- and the browser spent longer on them than on anything the person
came to see. The API already answers the question directly.
@vitramir
vitramir merged commit 70b9e19 into main Aug 29, 2026
1 of 2 checks passed
@vitramir
vitramir deleted the fetch-the-organizations-in-one-call branch August 29, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant