Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improve
/sites
endpoint performance (#90)
* feat: speed site retrieval up by making concurrent api calls Previously, site retrieval was slow because the GitHub API for retrieving org repos was paginated, and we retrieved the data sequentially, one page at a time. This meant that it often took up to 7 or even 8 seconds each time this endpoint is accessed (each page took around 3 seconds, perhaps due to the large amount of data being sent). This commit improves performance by making these api calls concurrently, so that it now only takes around 3 seconds for the endpoint to respond. This commit also introduces an optional env var, ISOMERPAGES_REPO_PAGE_COUNT, which determines how many pages of the GitHub API to comb simultaneously. Since we know the number of repos our github org has, we can use this info to speed up our endpoint by making concurrent calls instead of stepping through the API pagination. * refactor: remove unnecessary filter Co-authored-by: Jie Hao Kwa <[email protected]>
- Loading branch information