Re: [PATCH 1/3] improve reliability of fixup_pack_header_footer()
- From
Nicolas Pitre <nico@cam.org>
- Date
- Aug 29, 2008, 20:14 UTC
- Message-ID
- <alpine.LFD.1.10.0808291609030.1624@xanadu.home>
- In-Reply-To
- <20080829143023.GA7403@spearce.org>
On Fri, 29 Aug 2008, Shawn O. Pearce wrote:
Show 7 quoted lines
> Oh, yea, that makes sense. It still seems like playing with fire. > > I'd rather the caller pass in the proper offset than rely on it > being the current position of the fd. Especially if the caller > does actually have it available. > > If you change anything, I'd like to see this lseek(SEEK_CUR) go away.
Done. I struggled a bit since it simply didn't work initially -- see the first patch in the updated series.
> > And another thing I had in store (but for which you _again_ beat me to :-) ) > > is to realign data reads onto filesystem blocks. > > That _really_ made the JGit code ugly. But I think its worth it.
See my version. I think it is reasonably clear.
Show 5 quoted lines
> I also want to try and buffer the whole object appending we do > during fixThinPack(), as right now we write the object header in > one write and then compressed data bursts in the others. Moving it > to at least write a full 4k at a time should remove about 2 write > calls per object.
Yep. In the C git case, moving to sha1write() added that buffering for free.
Nicolas