stargazer icon indicating copy to clipboard operation
stargazer copied to clipboard

feat: add ability to skip fetching all stargazers

Open anuraghazra opened this issue 1 year ago • 1 comments

As pointed out in this tweet, if you have many stars fetching all the content takes quite a while, and it could also hit a rate limit on github API.

And for a 15sec video maybe it won't even be that noticeable if say we try to render all unique 60k stargazers, Instead we can add a flag or a "maxFetchCount" param to limit the fetch and after a while the video can just loop over or randomly pick stargazers in the middle to pad out the 15sec.


For this to work I think a better approach would be:

Say I have 50k stars:

  • We fetch first 10k stargazers
  • Pad out the middle with random stargazers
  • We fetch last 10k stargazers

We put these first/last stargazers as is so that the order is accurate in the video, and in the middle we can pad the stargazers by randomly picking stargazers.

LMK if this is something you will be interested in or you think it's worth adding.

anuraghazra avatar Oct 14 '23 17:10 anuraghazra

I think it is pretty rare that one has as many stars as you (congrats! 😛) And you still got it rendered, albeit taking some time.

Therefore it is not a priority for me personally but happy to accept PRs improving this.

JonnyBurger avatar Oct 23 '23 06:10 JonnyBurger