Stream packs to the destination#2004
Conversation
|
I suspect there are other places that could be changed from doing a one-shot compression to using a streaming compressor, but I admit that I didn't look too carefully. This was really just to get over the hump of running out of memory so that I could continue to debug other issues. I do have interest in looking closer at other zlib usages, but unfortunately I don't have the time to do that at present. |
|
This looks really nice to me. The zstream stuff seems like a better abstraction level and I agree that we can look later at other places that can be improved similarly. I have a couple of questions:
Obviously both of those questions can be answered at a future point if you just want to get this in as an incremental improvement. The code looks good to me! 🤘 |
|
Yes, that definitely makes sense. Let's sit on this then until I have a few minutes to look at that. |
|
Rebased and updated with @arrbee 's fine suggestions. |
|
Rrrrrrebased! Any objections? If not, I shall merge this bad boy. |
Stream packs to the destination
Streaming the pack through to the target may be preferable to compressing fully in-memory and then splatting it out to the target. (I was OOM'ing while pushing very large commits with very large blobs.)
This introduces some simple helper functions to wrap zlib to deal with error handling and to expose a more
write(2)like semantic.