-
Notifications
You must be signed in to change notification settings - Fork 2k
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
feat: Parallelize the GithubRepoLoader #2224
feat: Parallelize the GithubRepoLoader #2224
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,53 @@ | |||
import { jest, test } from "@jest/globals"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is flagging a new HTTP request using the fetch
function in the code, and it is recommended for maintainers to review this change.
edcda8c
to
21d433c
Compare
21d433c
to
c8caf3d
Compare
Looks nice! Just a bit worried about rate limits/the change in behavior - see comments |
Hey @yroc92, added max concurrency support with an internal utility we have. Thank you, will get this merged tonight! |
Thanks again! |
@jacoblee93 good to know about the concurrency limit support! It’s definitely easy to hit rate limits if you don’t filter out enough files with gitignore. But parallelizing the ops won’t impact the rate limit much because the limits are calls per hour. Using an API key makes the limits much higher. |
Ah gotcha. Well, I defaulted to 2 but you can always set it to |
Instead of synchronously fetching file content and directory info, this change leverages promises and
Promise.all
to parallelize the file retrieval whenrecursive = true
forGithubRepoLoader
.Fixes #2196
Twitter: https://twitter.com/yroc92