Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop checking multiple hashes #4135

Merged
merged 3 commits into from
Jul 31, 2024
Merged

Conversation

HebaruSan
Copy link
Member

Motivation

Currently the download_hash property of a module always contains sha1 and sha256, which is redundant. The sha256 is better and can detect corrupt files well enough on its own. The client checks both hashes, which takes extra time after downloading a file.

Changes

  • Now the client ignores the SHA1 if the SHA256 is defined. If only the SHA1 is defined, then it will still be checked.
  • Now netkan.exe will omit the SHA1 if the spec_version is greater than v1.34 (since the already-released clients in the v1.34 series require both). This will give us the option to save bot CPU the next time we increment the spec version.

This will shave some time off the validation step after downloading a big mod.

@HebaruSan HebaruSan added Enhancement New features or functionality Easy This is easy to fix Core (ckan.dll) Issues affecting the core part of CKAN Spec Issues affecting the spec Netkan Issues affecting the netkan data Performance Something's slower than it should be labels Jul 31, 2024
@HebaruSan HebaruSan merged commit 393544d into KSP-CKAN:master Jul 31, 2024
3 checks passed
@HebaruSan HebaruSan deleted the perf/sha-1 branch July 31, 2024 01:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core (ckan.dll) Issues affecting the core part of CKAN Easy This is easy to fix Enhancement New features or functionality Netkan Issues affecting the netkan data Performance Something's slower than it should be Spec Issues affecting the spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant