author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 28 Aug 2006 17:02:51 +0000 (13:02 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 14 Jan 2007 07:15:10 +0000 (02:15 -0500) | ||
commit | e2eb469d1ff9595882c8329ad415b1d7246769d0 | |
tree | bee2c6b297fbf6298e8470577bb93db659e595c6 | tree | snapshot |
parent | 4cabf8583f934260697a065186f3dce135834ede | commit | diff |
Recycle data buffers for tree generation in fast-import.
We only ever generate at most two tree streams at a time. Since most
trees are around the same size we can simply recycle the buffers from
one tree generation to the next rather than constantly xmalloc'ing
and free'ing them. This should perform slightly better when handling
a large number of trees as malloc has less work to do.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
We only ever generate at most two tree streams at a time. Since most
trees are around the same size we can simply recycle the buffers from
one tree generation to the next rather than constantly xmalloc'ing
and free'ing them. This should perform slightly better when handling
a large number of trees as malloc has less work to do.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | diff | blob | history |