diff options
| author | Nicolas Pitre <nico@cam.org> | 2006-02-27 23:38:28 -0500 |
|---|---|---|
| committer | Junio C Hamano <junkio@cox.net> | 2006-03-01 21:53:22 -0800 |
| commit | 38fd0721d0a2a1a723bc28fc0817e3571987b1ef (patch) | |
| tree | f2bb05ddb2759ba51d540195d26b30570d7063b5 /contrib/git-svn/git-svn.perl | |
| parent | diff-delta: bound hash list length to avoid O(m*n) behavior (diff) | |
| download | git-38fd0721d0a2a1a723bc28fc0817e3571987b1ef.tar.gz git-38fd0721d0a2a1a723bc28fc0817e3571987b1ef.zip | |
diff-delta: allow reusing of the reference buffer index
When a reference buffer is used multiple times then its index can be
computed only once and reused multiple times. This patch adds an extra
pointer to a pointer argument (from_index) to diff_delta() for this.
If from_index is NULL then everything is like before.
If from_index is non NULL and *from_index is NULL then the index is
created and its location stored to *from_index. In this case the caller
has the responsibility to free the memory pointed to by *from_index.
If from_index and *from_index are non NULL then the index is reused as
is.
This currently saves about 10% of CPU time to repack the git archive.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'contrib/git-svn/git-svn.perl')
0 files changed, 0 insertions, 0 deletions
