src-d / go-git

Project has been moved to: https://github.com/go-git/go-git
https://github.com/go-git/go-git
Apache License 2.0
4.9k stars 541 forks source link

Worktree: improve build index performance. #1179

Closed orisano closed 5 years ago

orisano commented 5 years ago

ref: #1170

orisano commented 5 years ago
name          old time/op    new time/op    delta
PlainClone-4      605s ± 4%      249s ± 7%  -58.91%  (p=0.008 n=5+5)

name          old alloc/op   new alloc/op   delta
PlainClone-4    64.9GB ± 0%    56.1GB ± 0%  -13.48%  (p=0.008 n=5+5)

name          old allocs/op  new allocs/op  delta
PlainClone-4      117M ± 0%      118M ± 0%   +0.57%  (p=0.008 n=5+5)
jfontan commented 5 years ago

I believe you can also add the changes in storage/filesystem/index.go from #1170. These should improve speed even more.

orisano commented 5 years ago

Added!

jfontan commented 5 years ago

@orisano Thanks!

@mcuadros it LGTM