From owner-freebsd-git@freebsd.org Tue May 28 17:57:35 2019 Return-Path: Delivered-To: freebsd-git@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11DDA15A706C for ; Tue, 28 May 2019 17:57:35 +0000 (UTC) (envelope-from ilya@bakulin.de) Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CB2128AC69 for ; Tue, 28 May 2019 17:57:33 +0000 (UTC) (envelope-from ilya@bakulin.de) Received: by mail-lj1-x244.google.com with SMTP id q16so1478704ljj.8 for ; Tue, 28 May 2019 10:57:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bakulin-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hzkSLx9m9o4BNNxpq6HfGOqUW5R8ZYTyfdzEXddfZl8=; b=jtutWhLe2rX0N8j/VJ4FZRYbrNmpRl651r8+eAnNQkywFZONxxek9/d+Uj0xQkUgBC EJDfWNgdesO3NobSBUyufjqqygZIhlgSl9pCJfGRiM+1v8pv7RpAcg3wvajvaRkZuvW3 MLUciUc5PKf3D82u6uJEdxteWPiBVEINGCqMDM6S6PMz2ISTtMrpscF0200HDK9E3ElA 6IsokfXscjprFdSwWq6ARIWUtDEUkNT2vvN6FrqDOMj2d1tGK/Rx4yP4nyfBNXGrGAw0 UB0r44CzvhQ0GsC/icFfnCmhleJxdq+CrqZOz/xhg7wYPTzFAOBIRbgFVU0qloXianh8 KElA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hzkSLx9m9o4BNNxpq6HfGOqUW5R8ZYTyfdzEXddfZl8=; b=gCMPwLxMunu5tM57SWhacOdvQbxY87qZzgElegPHFHdBd3hGxXOihZvRXwfcczwbyE iAHQ0hHoTMz2h3UJfczGM0OV06WUC5cDulxxkE2BcWDLMgBP/sXXTD1S032KGM3JGnC/ UKK2pp69BOt2pdlsjcDj/SClQ9EZr2NjY8QamPlbtFP9+QGpTYsuIEDIdBN5rVwuPris 4XIaZfZLE1oAgHOow4XfS8PzXCwwNS6T3qkpUB3+wdkFkGkR9HlXC9Yl2NsqQNQ6+5Wm 8eq+35qx9Kk0scUpvYnVvhrZSQu1DLaf6J96AYKb4e0To7lovGTSbwG5TnSDwhYsiMX7 vKkw== X-Gm-Message-State: APjAAAWgpiKgmyQ88sOzXNhspB3aKIxzcRTYdA5Yo6BE9IfncIMcV9q9 qPXNO5eOk+wKPyZLhFPvQDeNQw6FxtCmxH96vz2EVA== X-Google-Smtp-Source: APXvYqx2g9mnjmEcxsZheJXdiQWDJnctG2ElzfaZVI6pltR536FUvUXMXaQNUvLI6W+hGgMB0TRveZyaxUOlXCXkjRg= X-Received: by 2002:a2e:3101:: with SMTP id x1mr23484527ljx.148.1559066252099; Tue, 28 May 2019 10:57:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Ilya Bakulin Date: Tue, 28 May 2019 19:57:21 +0200 Message-ID: Subject: Re: Speeding up slower Git operations To: Ed Maste Cc: freebsd-git@freebsd.org X-Rspamd-Queue-Id: CB2128AC69 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bakulin-de.20150623.gappssmtp.com header.s=20150623 header.b=jtutWhLe X-Spamd-Result: default: False [-0.89 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.96)[-0.955,0]; R_DKIM_ALLOW(-0.20)[bakulin-de.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.67)[0.673,0]; NEURAL_HAM_LONG(-1.00)[-0.997,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-git@freebsd.org]; DMARC_NA(0.00)[bakulin.de]; URI_COUNT_ODD(1.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bakulin-de.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[4.4.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: alt1.aspmx.l.google.com]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-0.31)[ip: (3.01), ipnet: 2a00:1450::/32(-2.18), asn: 15169(-2.29), country: US(-0.06)] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-git@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion of git use in the FreeBSD project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2019 17:57:35 -0000 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 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" >