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

change default chunk size to 1 MB #342

Merged
merged 1 commit into from
Jan 22, 2025

Conversation

spencerschrock
Copy link
Contributor

@spencerschrock spencerschrock commented Jan 16, 2025

Summary

change default chunk size to 1 MB

This value was based on the benchmarks in f0a6e96.

Release Note

  • Fine-tuned a lower level parameter used when hashing files, resulting in a speed improvement. The exact improvement is platform dependent but we observed improvements of 50-80%.

Documentation

NONE

@spencerschrock

This comment was marked as outdated.

@@ -31,7 +31,7 @@ def create_file_of_given_size(path: str, size: int) -> None:
"""
file_path = pathlib.Path(path)
file_path.parent.mkdir(parents=True, exist_ok=True)
chunk_size = 8192
chunk_size = 1048576
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change wasn't benchmarked (but also isn't required to have good performance), but changed for unity.

This value was based on the benchmarks in f0a6e96. The exact improvement
is platform dependent, but we observed improvements of 50-80%.

Signed-off-by: Spencer Schrock <[email protected]>
@spencerschrock spencerschrock marked this pull request as ready for review January 22, 2025 21:44
@spencerschrock spencerschrock requested review from a team as code owners January 22, 2025 21:44
Copy link
Collaborator

@mihaimaruseac mihaimaruseac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@mihaimaruseac mihaimaruseac merged commit 51657ea into sigstore:main Jan 22, 2025
32 checks passed
@spencerschrock spencerschrock deleted the optimize-chunk branch January 22, 2025 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants