Concurrently like all repos at once with goroutines#12
Concurrently like all repos at once with goroutines#12JacobGo wants to merge 1 commit intopsampaz:masterfrom
Conversation
|
Hi @JacobGo, sorry for my late reply and thank you for this PR. I do not know if I like the idea of sending requests concurrently, since according to Github recommendations:
Source https://docs.github.com/en/rest/guides/best-practices-for-integrators#dealing-with-abuse-rate-limits If you can reference an official Github source with concurrency limits, I might consider moving with this forward. But, since you recently started with Go, my feedback for the PR is that is it fine. The only thing that I would add is some limit in concurrency using the idea described here http://jmoiron.net/blog/limiting-concurrency-in-go/. thank you |
I found that I can improve performance on potentially huge projects by liking all repos at the same time instead of sequentially. Used a separate goroutine for each repo, synced by a WaitGroup.
Some additional thoughts:
client.Activity.IsStarred()with a single initial call toclient.Activity.ListStarred().I am quite new to Go and this is my first open source contribution in the language so please let me know if I missed something. Thanks!