Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
As of #2808, we now load the remote build map every time netkan.exe runs in order to validate that generated metadata matches at least one known game version. This means that per bot pass, we download https://raw.githubusercontent.com/KSP-CKAN/CKAN-meta/master/builds.json 1800 times. This is much more frequent than necessary considering that weeks or months typically pass between KSP versions.
Changes
Now
KspBuildMap
is rearranged to allow client code to choose the Remote, Cached, or Embedded build map. The default is the same as before: load Cached with Remote and then Embedded as fallbacks if nothing special is done, otherwise load Remote with Cached and then Embedded as fallbacks ifRefresh
is called. However, now there's also the option to only load the Embedded build map, which is used in the Netkan game version validator. This will reduce network usage by the bot.Fixes #2809.