diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2018-08-18 16:41:25 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-08-18 09:47:46 -0700 |
commit | f1e11c6510846321574e0ad9443843d7ba3eb758 (patch) | |
tree | 36df1345e4cdfbd82cbe7f5f26aeed9390b86f9e /commit.c | |
parent | b4da37380b7774248086f42bcd59397a44e1ac79 (diff) |
unpack-trees: reduce malloc in cache-tree walk
This is a micro optimization that probably only shines on repos with
deep directory structure. Instead of allocating and freeing a new
cache_entry in every iteration, we reuse the last one and only update
the parts that are new each iteration.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.c')
0 files changed, 0 insertions, 0 deletions