Large number of forks causes long page load times

Open
#442 0 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
64/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
graphql, typescript

Research direction

Read src/bot/graphql.ts around getReposInOrgGQL and src/hooks/useForks.tsx around useForksData, then reproduce the delay with an organization containing many mirrors while recording network logs. Identify why the paginated UI waits on multiple fork-detail queries; done means the fork list displays without waiting for all details and the request time is reduced.

Written by the indexing model from the issue text.

Description

bug
Describe the bug

When using the private mirrors UI to view the list of forks for an organization that contains a large number of forks the page can take a long time to initially load despite the use of pagination.

To Reproduce
  1. Open the private-mirrors UI
  2. Open the browser developer console to ensure that network logs are being captured
  3. Navigate to an organization that contains a lot of mirrors (in testing 150 repositories cause the load to take about 30 seconds)
  4. Look through the network logs and add up the time that it takes for all of the "getReposInOrgGQL" queries to run
Expected behavior

The private-mirrors UI should effectively paginate and lazy load the fork list to avoid making the user wait for all fork details to load before displaying any of them. The "getReposInOrgGQL" query and useForksData function should also be investigated to determine if other optimizations can and should be made.

Screenshots

No response

Additional context

No response

Dominant language
TypeScript
Stars
203
Forks
42
Avg merge
1h 15m
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github-community-projects/private-mirrors

All issues in github-community-projects/private-mirrors

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.