-
Notifications
You must be signed in to change notification settings - Fork 592
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
Too many GetMentionableUsers POST requests #2892
Comments
If I remove the pre-fetching of mentionable users entirely, then the @ user completion items in PR comments is unusably slow. Instead of removing the pre-fetching, it is now only done when a PR is checked out. |
@alexr00 Thanks for the quick fix! To clarify: since this behavior is still active when a PR is checked out, is the preloading still going to be a thing if someone uses “Open in Codespaces” action for a PR in a project to open VS Code in their browser? |
Yes, the preloading will still happen in that case. The mentionable users are used for when the user types If this preloading is still to much, then we can consider some of the following changes:
|
After discussing with some folks I'll look into some further caching so that this is improved for PRs too. |
Closing for verification. Caching solution will be implemented with #2897 |
To verify:
|
Verified. Also verified that it then loads when I checkout a PR and start writing a comment. |
In the JS console I can see 51 POST requests having been made to https://api.github.com/graphql. Of those, most are the result of a paginated query called GetMentionableUsers that preloads all mentionable users for this repository.
A giant repository like rails/rails will have 4304 mentionable users, which includes all org members and all prior contributors to the codebase. It will take at least 44 sequential API requests to paginate them all. It's not clear to me why a fresh VS Code instance would preload all this before this information is needed for anything. Could this load to the GitHub API be avoided?
The text was updated successfully, but these errors were encountered: