author | Pierre Habouzit <madcoder@debian.org> | |
Mon, 17 Sep 2007 12:00:38 +0000 (14:00 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 18 Sep 2007 07:55:25 +0000 (00:55 -0700) | ||
commit | 0557656930d41f10c90bccf90e3c5bd87bd53661 | |
tree | 7760bf79e58acdc0ba9305aa368b87b44fbb1686 | tree | snapshot |
parent | eec813cfc6409a1b72399acf7ac08283faad7b8f | commit | diff |
fast-import optimization:
Now that cmd_data acts on a strbuf, make last_object stashed buffer be a
strbuf as well. On new stash, don't free the last stashed buffer, rather
swap it with the one you will stash, this way, callers of store_object can
act on static strbufs, and at some point, fast-import won't allocate new
memory for objects buffers.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Now that cmd_data acts on a strbuf, make last_object stashed buffer be a
strbuf as well. On new stash, don't free the last stashed buffer, rather
swap it with the one you will stash, this way, callers of store_object can
act on static strbufs, and at some point, fast-import won't allocate new
memory for objects buffers.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
fast-import.c | diff | blob | history |