author | Junio C Hamano <gitster@pobox.com> | |
Sat, 21 Nov 2009 06:13:47 +0000 (22:13 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 21 Nov 2009 06:13:47 +0000 (22:13 -0800) | ||
commit | 809809bb75e8a65ef543ab706aab4791459be95c | |
tree | 0c31f2f311e7d4db373ca28336a2aa4beb8fc95d | tree | snapshot |
parent | 8282de94bc76360e0bf76da4076755696b049d23 | commit | diff |
diffcore-rename: reduce memory footprint by freeing blob data early
After running one round of estimate_similarity(), filespecs on either
side will have populated their cnt_data fields, and we do not need
the blob text anymore. We used to retain the blob data to optimize
for smaller projects (not freeing the blob data here would mean that
the final output phase would not have to re-read it), but we are
efficient enough without such optimization for smaller projects anyway,
and freeing memory early will help larger projects.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
After running one round of estimate_similarity(), filespecs on either
side will have populated their cnt_data fields, and we do not need
the blob text anymore. We used to retain the blob data to optimize
for smaller projects (not freeing the blob data here would mean that
the final output phase would not have to re-read it), but we are
efficient enough without such optimization for smaller projects anyway,
and freeing memory early will help larger projects.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diffcore-rename.c | diff | blob | history |