rundel / ghclass

Tools for managing classroom organizations
https://rundel.github.io/ghclass/
GNU General Public License v3.0
142 stars 22 forks source link

Reduce API calls #64

Open thereseanders opened 5 years ago

thereseanders commented 5 years ago

The maximum API calls per hour for an organization with > 20 repos and > users is 12,500.

There are a number of feasible scenarios in which the peer review functions would exceed this limit. plot_apicalls

Suggestion for reducing calls:

thereseanders commented 5 years ago

Actually, is the limit 5,000 after all, because we all requests in ghclass are user-to-server, as opposed to server-to-server, requests? https://developer.github.com/apps/building-github-apps/understanding-rate-limits-for-github-apps/

thereseanders commented 5 years ago

Updated figure with logged API calls on y-axis and more detail. plot_apicalls

thereseanders commented 5 years ago

Places to reduce API calls

thereseanders commented 5 years ago

The new version of peer_assign() and peer_return() incorporates the functionality of peer_add_file_aut() and peer_add_file_rev(), respectively, and reduces overall API calls by tracking files.

400 students, 2 reviewers, and 2 files (1 file for peer_return()) now is feasible.

plot_apicalls_190802

mine-cetinkaya-rundel commented 5 years ago

Nice!