tipsy / profile-summary-for-github

Tool for visualizing GitHub profiles
https://profile-summary-for-github.com/
Apache License 2.0
19.83k stars 494 forks source link

Star-check is slow #87

Closed tipsy closed 6 years ago

tipsy commented 6 years ago

Usually this isn't a problem, (since traffic is low these days), but it takes a long time to check if a user has starred the repo (seems to be about 1s per 100 stars the user has given). Should perhaps look at optimizing this. Any thoughts @iProdigy?

iProdigy commented 6 years ago

That PR will help a little but yeah we are currently requesting starred repos 100 at a time until we find our repo or there are no more pages left... worth investigating more optimal api usage

Edit: the speed limitations of this approach seem to be a limitation of the version of the github api org.eclipse.egit.github.core v2.1.5 provides...

tipsy commented 6 years ago

@iProdigy I made a fix (or a hack) in 3886d8e5933f7f2deba0804b2f993bcada61b734.

The code works like this:

I can think of some cases where this will fail, but not very realistic ones. Let me know if you think I overlooked something.

iProdigy commented 6 years ago

Should have some time in the upcoming days to review this