diff options
author | Brian Downing <bdowning@lavos.net> | 2008-08-14 00:36:51 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-08-13 23:10:23 -0700 |
commit | b463776086a12c587f6d91c0347641fb6f7ddd72 (patch) | |
tree | ba25e4234a81ed9d972accfe92276a407c46225b /t | |
parent | Make xdi_diff_outf interface for running xdiff_outf diffs (diff) | |
download | tgif-b463776086a12c587f6d91c0347641fb6f7ddd72.tar.xz |
Use strbuf for struct xdiff_emit_state's remainder
Continually xreallocing and freeing the remainder member of struct
xdiff_emit_state was a noticeable performance hit. Use a strbuf
instead.
This yields a decent performance improvement on "git blame" on certain
repositories. For example, before this commit:
$ time git blame -M -C -C -p --incremental server.c >/dev/null
101.52user 0.17system 1:41.73elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+39561minor)pagefaults 0swaps
With this commit:
$ time git blame -M -C -C -p --incremental server.c >/dev/null
80.38user 0.30system 1:20.81elapsed 99%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+50979minor)pagefaults 0swaps
Signed-off-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
0 files changed, 0 insertions, 0 deletions