Date: Tue, 28 May 2019 03:13:41 -0400 From: Ed Maste <emaste@freebsd.org> To: freebsd-git@freebsd.org Subject: Speeding up slower Git operations Message-ID: <CAPyFy2AWw0EaeThqpa2Gb9bJCnjb3UgHCARvdpUnh=Pp8mpKkA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Microsoft has been putting a lot of work into improving git performance and scalability with large repositories. A recent development is the addition of the commit-graph feature[1], which caches information about the commit graph and speeds up operations like determining if a commit is on a specified branch, or obtaining the commit count. As an example of the performance gain, the feature's developer reports that a "git branch --contains" on the Linux kernel went from 76.20s to 0.04s. In my FreeBSD tree "git rev-list HEAD --count" went from an average of 2.77s wall clock to 0.39s. This operation (rev-list --count) is interesting as it can serve as a replacement for monotonically increasing version numbers, and with it executing in under half a second it seems like it'd be reasonable to add it to newvers.sh (to bake into uname). To enable the feature, enable the commitGraph option: % git config core.commitGraph true Then populate the commit graph: % git commit-graph write --reachable If you try it please reply and let us know how it worked for you. [1] https://devblogs.microsoft.com/devops/supercharging-the-git-commit-graph/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPyFy2AWw0EaeThqpa2Gb9bJCnjb3UgHCARvdpUnh=Pp8mpKkA>