Skip to content

Loading too slow if too many branches #41

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

Open
NirmalScaria opened this issue Mar 2, 2023 · 2 comments
Open

Loading too slow if too many branches #41

NirmalScaria opened this issue Mar 2, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@NirmalScaria
Copy link
Owner

NirmalScaria commented Mar 2, 2023

Describe the bug
If the repository contains too many branches, the first loading of commits tab takes too long. This is particularly visible if the number of branches is greater than 100, since that would mean waiting for another GraphQL request.

To Reproduce
Steps to reproduce the behavior:

  1. Go to a repo with too many branches. ( https://github.com/flutter/flutter is a good example )
  2. Click on "Commits" tab (added by the extension)
  3. See error

Expected behavior
The loading should be way faster than this.

Screenshots
NA

Version information:

Additional context
This was known during the development times itself, and had no other option. There is no API from github that lists commits across all branches sorted by commit date. Either that, or an API that lists branches sorted by head commit date could solve this problem. AFAIK, neither exists and a fresh solution would be required.

@igorsol
Copy link

igorsol commented Mar 20, 2025

I stumbled on this issue with https://github.com/mongodb/mongo today. For that repository loading never finishes at all.
In fact it does not make sense to analyze all branches by default when there are dozens of them.
Can we have option to only analyze currently selected branch?

@NirmalScaria
Copy link
Owner Author

The issue is a direct result of the restriction of GitHub API that pagination allows maximum of 100 items per request.

Regarding your new proposal for only showing currently selected branch:
There is no concept of currently selected branch before the page actually loads.
But it is possible to make an extra option. If the pagination is taking too long, show an indication "There are too many branches" and a button "Show filtered branches instead". Upon clicking, the user could see the list of branches, select only the ones they need, and proceed, so as to show the selected branch commits only.

I will keep this issue open for now, for anyone who will be interested in implementing the feature.

@NirmalScaria NirmalScaria added the good first issue Good for newcomers label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants