KSP-CKAN / NetKAN-Infra

NetKAN Infrastructure Repo
MIT License
3 stars 6 forks source link

Only count each repo's downloads once #274

Closed HebaruSan closed 2 years ago

HebaruSan commented 2 years ago

Motivation

Currently the download counter performs one GraphQL query per mod. In 184 cases, these queries duplicate other queries that have already been made, because some mods share repositories. This means we take extra time and network capacity; since GitHub's API has rate limiting, it's a good idea to minimize our risk of being throttled.

Changes

Since each GraphQL API call contains 40 mods, eliminating 184 queries represents 4.6 fewer network round trips.

techman83 commented 2 years ago

Neat!