Date: Tue, 28 May 2019 19:57:21 +0200 From: Ilya Bakulin <ilya@bakulin.de> To: Ed Maste <emaste@freebsd.org> Cc: freebsd-git@freebsd.org Subject: Re: Speeding up slower Git operations Message-ID: <CADzbx%2Bq=sn%2B_bqtwE65GjfkPYZLxpx0-cLLEvH6sisJ7M-QrWQ@mail.gmail.com> In-Reply-To: <CAPyFy2AWw0EaeThqpa2Gb9bJCnjb3UgHCARvdpUnh=Pp8mpKkA@mail.gmail.com> References: <CAPyFy2AWw0EaeThqpa2Gb9bJCnjb3UgHCARvdpUnh=Pp8mpKkA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
You are counting commits behind HEAD which is a mere pointer to the current branch head. So if you are working on some "topic" branch then the number becomes effectively useless since it will count a number of commits behind that topic branch HEAD. So this number alone is not sufficient unless you also append "-dirty" or something else to denote the "canonical" build done from a clean git checkout of the official FreeBSD repository. Which is a good idea anyway, I guess. So that when somebody reports a bug on some mailing list and includes a kernel version number (or freebsd-version output) it's immediately obvious that they are using a non-official kernel. On Tue, May 28, 2019 at 3:43 PM Ed Maste <emaste@freebsd.org> wrote: > 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/ > _______________________________________________ > freebsd-git@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-git > To unsubscribe, send any mail to "freebsd-git-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADzbx%2Bq=sn%2B_bqtwE65GjfkPYZLxpx0-cLLEvH6sisJ7M-QrWQ>