Skip to content

Improve search iteration for Github identity search#579

Merged
CMCDragonkai merged 5 commits into
stagingfrom
feature-improve-githubProvider
Oct 19, 2023
Merged

Improve search iteration for Github identity search#579
CMCDragonkai merged 5 commits into
stagingfrom
feature-improve-githubProvider

Conversation

@addievo

@addievo addievo commented Oct 13, 2023

Copy link
Copy Markdown
Contributor

Description

PR aims to improve github identity search since it was very slow iterating over every user followed / following. Now it does a rate search and Promise.all if current rate limit allows it.

Issues Fixed

Tasks

  • 1. Introduce rate limit
  • 2. Introduce Promise.all for followers/following.
  • 3. Default back to old search if exceeds rate limit.

Final checklist

  • Domain specific tests
  • Full tests
  • Updated inline-comment documentation
  • Lint fixed
  • Squash and rebased
  • Sanity check the final build

@addievo addievo self-assigned this Oct 13, 2023
@ghost

ghost commented Oct 13, 2023

Copy link
Copy Markdown
👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@amydevs
amydevs force-pushed the feature-improve-githubProvider branch from ebb5842 to 224aea2 Compare October 13, 2023 11:43
Comment thread src/identities/providers/github/GitHubProvider.ts
Comment thread src/identities/providers/github/GitHubProvider.ts Outdated
Comment thread src/identities/providers/github/GitHubProvider.ts Outdated
Comment thread src/identities/providers/github/GitHubProvider.ts Outdated
Comment thread src/identities/providers/github/GitHubProvider.ts Outdated
Comment thread src/identities/providers/github/GitHubProvider.ts
@CMCDragonkai

Copy link
Copy Markdown
Member

Needs to be squashed and commentary resolved.

@amydevs
amydevs force-pushed the feature-improve-githubProvider branch from 9372c8c to 5dfd7e3 Compare October 18, 2023 00:10
addievo and others added 4 commits October 19, 2023 16:26
@amydevs
amydevs force-pushed the feature-improve-githubProvider branch from 5dfd7e3 to 6137948 Compare October 19, 2023 05:26
@addievo
addievo requested a review from CMCDragonkai October 19, 2023 06:17
@addievo addievo assigned amydevs and unassigned addievo Oct 19, 2023
@amydevs
amydevs force-pushed the feature-improve-githubProvider branch from f09207f to 0a5899a Compare October 19, 2023 06:45
@CMCDragonkai

CMCDragonkai commented Oct 19, 2023

Copy link
Copy Markdown
Member

It's now instant, great!

Originally it was 2 requests, one to the page, another to get the user detail for each user. Now it is just 1 request to the page, which also contains the additional information.

@CMCDragonkai
CMCDragonkai merged commit 56a6de5 into staging Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Identity Search is slow.

3 participants