Re: [PATCH 9/9] send-email: move trivial config handling to Perl
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 12, 2021, 19:52 UTC
- Message-ID
- <CAPig+cSxFzg5F6xfLK0hnWg5tjQ7qbcpaQb=SR0sY2tFQVrbvA@mail.gmail.com>
- In-Reply-To
- <patch-9.9-0d87c9a5a3-20210512T132955Z-avarab@gmail.com>
On Wed, May 12, 2021 at 9:48 AM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 12 quoted lines
> Optimize the startup time of git-send-email by using an amended > config_regexp() function to retrieve the list of config keys and > values we're interested in. > > For boolean keys we can handle the [true|false] case ourselves, and > the "--get" case didn't need any parsing. Let's leave "--path" and > other "--bool" cases to "git config". As noted in a preceding commit > we're free to change the config_regexp() function, it's only used by > "git send-email". > > This brings the runtime of "git send-email" from ~60-~70ms to a very > steady ~40ms on my test box. We no run just one "git config"
s/no/now/
Show 9 quoted lines
> invocation on startup instead of 8, the exact number will differ based > on the local sendemail.* config. I happen to have 8 of those set. > > This brings the runtime of t9001-send-email.sh from ~13s down to ~12s > for me. The change there is less impressive as many of those tests set > various config values, and we're also getting to the point of > diminishing returns for optimizing "git send-email" itself. > > Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>