From: Ben Peart Date: Mon, 30 Jul 2018 20:16:03 GMT Subject: Re: [PATCH v2 1/4] unpack-trees.c: add performance tracing Message-ID: In-Reply-To: <20180729103306.16403-2-pclouds@gmail.com> On 7/29/2018 6:33 AM, Nguyễn Thái Ngọc Duy wrote: > We're going to optimize unpack_trees() a bit in the following > patches. Let's add some tracing to measure how long it takes before > and after. This is the baseline ("git checkout -" on gcc.git, 80k > files on worktree) > > 0.018239226 s: read cache .git/index > 0.052541655 s: preload index > 0.001537598 s: refresh index > 0.168167768 s: unpack trees > 0.002897186 s: update worktree after a merge > 0.131661745 s: repair cache-tree > 0.075389117 s: write index, changed mask = 2a > 0.111702023 s: unpack trees > 0.000023245 s: update worktree after a merge > 0.111793866 s: diff-index > 0.587933288 s: git command: /home/pclouds/w/git/git checkout - > > Signed-off-by: Nguyễn Thái Ngọc Duy I've reviewed this patch and it looks good to me. Nice to see the additional breakdown on where time is being spent.