Fetch a member's organizations in one call - #158
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OrganizationContextresolved the caller's organizations with oneGetOrganizationper 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.
ListAccessibleOrganizationsanswers the same question in one call. Same data, same shape intomapOrganizations; the per-membership id list it used to build is gone with it.