Skip to content

the return of the strbuf

Pierre Habouzit git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3Drop strbuf's 'eof' marker, and make read_line a first class citizen.builtin-checkout-index.c builtin-update-index.c fast-import.c +4 more+39 -410 replies
2/3fast-import was using dbuf's, replace them with strbuf's.fast-import.c+68 -1090 replies
3/3fast-import optimization:fast-import.c+20 -320 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] the return of the strbuf

While getting rid of ->eof in strbuf (as it was somehow tasteless). It
made me aware of the fact that fast-import.c was using a custom buffer implementation (I think that was the fourth if not the fifth). So here is the series that eradicates it.

Trying to understand fast-import.c code, I happened to remark that it
was possible to avoid many reallocations, just by reusing old buffers rather than dropping them (this was not possible in a readable way before, but it is now, and uses the same mechanisms that was garbage collecting buffers, to swap them instead).

I've not enough stuff to do real-life tests of the old fast-import and
the new one, but I wouldn't be surprised that it gives a quite nice speed improvements for tools that use long fast-import batches. If not, well, the code is shorter and more readable, hence it's still a gain.

Signature · 3 lines
·O·  Pierre Habouzit
··O                                                [email protected]
OOO                                                http://www.madism.org