Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In git reset --hard, unpack-trees() is called with oneway_merge(). oneway_merge calls lstat for each files in a repository. It is bottleneck of git reset --hard, especially in large repository. This patch improves time by using fscache. In chromium repository, time of git reset --hard is changed like below. I took 3 times stats in the repository. master: TotalSeconds: 21.0337971 TotalSeconds: 20.0046612 TotalSeconds: 20.6501752 Avg: 20.5628778333333 this patch: TotalSeconds: 4.8552376 TotalSeconds: 4.8722343 TotalSeconds: 4.9268245 Avg: 4.88476546666667 Signed-off-by: Takuto Ikuta <tikuta@chromium.org>
- Loading branch information