Re: [PATCH v2 3/4] unpack-trees: reduce malloc in cache-tree walk

2018-07-30 Thread Ben Peart
On 7/29/2018 6:33 AM, Nguyễn Thái Ngọc Duy wrote: 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.

[PATCH v2 3/4] unpack-trees: reduce malloc in cache-tree walk

2018-07-29 Thread Nguyễn Thái Ngọc Duy
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 --- unpack-trees