Add git_mempack_write_thin_pack#6875
Merged
Merged
Conversation
4 tasks
Member
|
Thanks! Really useful addition; I'll review this shortly. 🙏 |
|
@ethomson friendly ping. |
ethomson
reviewed
Sep 27, 2024
Member
ethomson
left a comment
There was a problem hiding this comment.
Thanks for this. I made two very trivial minor suggestions in keeping with the library's styling. Otherwise, a great addition. 🙏
Mic92
reviewed
Sep 27, 2024
Unlike existing functions, this produces a _thin_ packfile by making use of the fact that only new objects appear in the mempack Object Database. A thin packfile only contains certain objects, but not its whole closure of references. This makes it suitable for efficiently writing sets of new objects to a local repository, by avoiding many small I/O operations. This relies on write_pack (e.g. git_packbuilder_write_buf) to implement the "recency order" optimization step. Basic measurements comparing against the writing of individual objects show a speedup during when writing large amounts of content on machines with comparatively slow I/O operations, and little to no change on machines with fast I/O operations.
14e355d to
f9c35fb
Compare
|
CI is green! |
|
Question, will this patch be part of the v1.8.2 or later? |
Member
|
I'm going to cut a release 🔜 |
Contributor
Author
|
Thank you @ethomson for reviewing and accepting! |
Any ETA on this? |
|
1.8.4 was released a while ago but this patch is no included. Are the patch releases made of a different branch? |
Closed
|
@Mic92 Ah I see it is in 1.9.0: https://github.com/libgit2/libgit2/blob/main/docs/changelog.md#v190 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Unlike existing functions, this produces a thin packfile by making use of the fact that only new objects appear in the mempack Object Database.
A thin packfile only contains certain objects, but not its whole closure of references. This makes it suitable for efficiently writing sets of new objects to a local repository, by avoiding many small I/O operations.
This relies on
write_pack(e.g.git_packbuilder_write_buf) to implement the "recency order" optimization step.Basic measurements comparing against the writing of individual objects show a speedup during when writing large amounts of content on machines with comparatively slow I/O operations, and little to no change on machines with fast I/O operations.
I have used this in NixOS/nix#11330, in conjunction with #6874