git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/9] send-email: various optimizations to speed up by >2x

From
Jeff King <peff@peff.net>
Date
May 12, 2021, 23:34 UTC
Message-ID
<YJxmHbHAn4x93xsr@coredump.intra.peff.net>
In-Reply-To
<cover-0.9-0000000000-20210512T132955Z-avarab@gmail.com>
On Wed, May 12, 2021 at 03:48:16PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 7 quoted lines
> This combines by not-picked-up[1] recent patches to remove the support
> for the "sendemail.smtpssl" variable with the later patches showing
> where that effort was really going.
> 
> As noted in the subject this speeds up git-send-email invocations by
> ~2x or more, and brings the very slow t9001 test from running in ~26s
> on my box to ~12s. It's no longer consistently the slowest test I run.

Nice. I have observed that with a decent number of cores, the running time of the entire test suite correlates strongly with the running time of t9001. :)

Here are timings for individual tests run with "prove --state=slow,save". (This is on an 8-core machine using -j32, skipping cvs/svn/p4 tests, and using a tmpfs via --root). The timings were computed with:

  perl -MYAML -e '
    $_ = do { local $/; <> };
    # prove puts this non-YAML cruft at the end
    s/\.\.\.$//s;
    my $t = YAML::Load($_)->{tests};
    print "$_->[1] $_->[0]\n" for
      sort { $b->[1] <=> $a->[1] }
      map { [$_, $t->{$_}->{elapsed}] }
      keys(%$t);
  ' t/.prove | head

Before your patches, the whole sweet takes ~60-63s, and the top timings (from a 63s run) are:

    63.2607979774475 t9001-send-email.sh
    51.742644071579 t0027-auto-crlf.sh
    37.7909920215607 t3070-wildmatch.sh
    27.09605717659 t7610-mergetool.sh
    24.7028169631958 t7112-reset-submodule.sh
    24.5535898208618 t5572-pull-submodule.sh
    23.8404550552368 t9500-gitweb-standalone-no-errors.sh
    22.3544380664825 t7400-submodule-basic.sh
    21.7017750740051 t5510-fetch.sh
    21.4575610160828 t3305-notes-fanout.sh
Now after, which takes ~54-59s (this is from a 54s run):
  46.796669960022 t0027-auto-crlf.sh
  32.5747599601746 t3070-wildmatch.sh
  21.5069420337677 t7610-mergetool.sh
  20.8392388820648 t1701-racy-split-index.sh
  19.7403028011322 t5572-pull-submodule.sh
  19.7386808395386 t9001-send-email.sh
  19.4622302055359 t7112-reset-submodule.sh
  18.9555768966675 t9500-gitweb-standalone-no-errors.sh
  18.0672709941864 t7400-submodule-basic.sh
  17.641391992569 t5510-fetch.sh

I have some messy patches to split t9001 into two segments. They were waiting to get polished, but perhaps I can just discard them now. :)

Some side notes for those interested in timing the test suite:
  - If I run t9001 standalone, it goes much faster, of course; the CPU
    throttles down when we're running all the tests in parallel.
  - Those are with "-x --verbose-log", which is nice for catching flaky
    results. Dropping those seems to shave a few seconds off.
  - A big chunk of time for t0027 and t3070 is spent running the sed-based
    chain-linting for their huge tables of auto-generated tests (1400+
    and 1800+ respectively). Dropping the sed linting for just those
    tests knocks off about 30 CPU-seconds.
-Peff
Previous: Eric WongNext: Jeff King
Message 22 of 108 in “send-email: various optimizations to speed up by >2x”
  1. 0/9 send-email: various optimizations to speed up by >2xÆvar Arnfjörð Bjarmason, May 12, 2021
  2. 1/9 send-email: remove non-working support for "sendemail.smtpssl"Ævar Arnfjörð Bjarmason, May 12, 2021
  3. Đoàn Trần Công DanhMay 12, 2021
  4. 2/9 send-email: refactor sendemail.smtpencryption config parsingÆvar Arnfjörð Bjarmason, May 12, 2021
  5. 3/9 send-email: lazily load config for a big speedupÆvar Arnfjörð Bjarmason, May 12, 2021
  6. 4/9 send-email: lazily shell out to "git var"Ævar Arnfjörð Bjarmason, May 12, 2021
  7. 5/9 send-email: use function syntax instead of barewordsÆvar Arnfjörð Bjarmason, May 12, 2021
  8. Jeff KingMay 12, 2021
  9. 6/9 send-email: get rid of indirect object syntaxÆvar Arnfjörð Bjarmason, May 12, 2021
  10. 7/9 send-email: lazily load modules for a big speedupÆvar Arnfjörð Bjarmason, May 12, 2021
  11. 8/9 perl: lazily load some common Git.pm setup codeÆvar Arnfjörð Bjarmason, May 12, 2021
  12. Eric WongMay 12, 2021
  13. 9/9 send-email: move trivial config handling to PerlÆvar Arnfjörð Bjarmason, May 12, 2021
  14. Eric SunshineMay 12, 2021
  15. Jeff KingMay 12, 2021
  16. Felipe ContrerasMay 13, 2021
  17. Jeff KingMay 13, 2021
  18. Felipe ContrerasMay 13, 2021
  19. Ævar Arnfjörð BjarmasonMay 13, 2021
  20. Ævar Arnfjörð BjarmasonMay 13, 2021
  21. Eric WongMay 12, 2021
  22. Jeff KingMay 12, 2021
  23. Jeff KingMay 12, 2021
  24. Ævar Arnfjörð BjarmasonMay 13, 2021
  25. Jeff KingMay 13, 2021
  26. 00/10 send-email: various optimizations to speed up by >2xÆvar Arnfjörð Bjarmason, May 20, 2021
  27. 01/10 send-email: remove non-working support for "sendemail.smtpssl"Ævar Arnfjörð Bjarmason, May 20, 2021
  28. 02/10 send-email: refactor sendemail.smtpencryption config parsingÆvar Arnfjörð Bjarmason, May 20, 2021
  29. 03/10 send-email: lazily load config for a big speedupÆvar Arnfjörð Bjarmason, May 20, 2021
  30. 04/10 send-email: lazily shell out to "git var"Ævar Arnfjörð Bjarmason, May 20, 2021
  31. 05/10 send-email: use function syntax instead of barewordsÆvar Arnfjörð Bjarmason, May 20, 2021
  32. 06/10 send-email: get rid of indirect object syntaxÆvar Arnfjörð Bjarmason, May 20, 2021
  33. 08/10 perl: lazily load some common Git.pm setup codeÆvar Arnfjörð Bjarmason, May 20, 2021
  34. 07/10 send-email: lazily load modules for a big speedupÆvar Arnfjörð Bjarmason, May 20, 2021
  35. 10/10 perl: nano-optimize by replacing Cwd::cwd() with Cwd::getcwd()Ævar Arnfjörð Bjarmason, May 20, 2021
  36. 09/10 send-email: move trivial config handling to PerlÆvar Arnfjörð Bjarmason, May 20, 2021
  37. Jeff KingMay 20, 2021
  38. Junio C HamanoMay 20, 2021
  39. Ævar Arnfjörð BjarmasonMay 21, 2021
  40. Junio C HamanoMay 21, 2021
  41. Jeff KingMay 21, 2021
  42. Ævar Arnfjörð BjarmasonMay 21, 2021
  43. Jeff KingMay 21, 2021
  44. Felipe ContrerasMay 28, 2021
  45. Ævar Arnfjörð BjarmasonMay 29, 2021
  46. Felipe ContrerasMay 29, 2021
  47. Ævar Arnfjörð BjarmasonMay 30, 2021
  48. Felipe ContrerasMay 30, 2021
  49. Felipe ContrerasMay 28, 2021
  50. 00/13 send-email: various optimizations to speed up by >2xÆvar Arnfjörð Bjarmason, May 23, 2021
  51. 01/13 send-email tests: support GIT_TEST_PERL_FATAL_WARNINGS=trueÆvar Arnfjörð Bjarmason, May 23, 2021
  52. 02/13 send-email tests: test for boolean variables without a valueÆvar Arnfjörð Bjarmason, May 23, 2021
  53. 03/13 send-email: remove non-working support for "sendemail.smtpssl"Ævar Arnfjörð Bjarmason, May 23, 2021
  54. 04/13 send-email: refactor sendemail.smtpencryption config parsingÆvar Arnfjörð Bjarmason, May 23, 2021
  55. 05/13 send-email: copy "config_regxp" into git-send-email.perlÆvar Arnfjörð Bjarmason, May 23, 2021
  56. 06/13 send-email: lazily load config for a big speedupÆvar Arnfjörð Bjarmason, May 23, 2021
  57. 07/13 send-email: lazily shell out to "git var"Ævar Arnfjörð Bjarmason, May 23, 2021
  58. 09/13 send-email: get rid of indirect object syntaxÆvar Arnfjörð Bjarmason, May 23, 2021
  59. 08/13 send-email: use function syntax instead of barewordsÆvar Arnfjörð Bjarmason, May 23, 2021
  60. 10/13 send-email: lazily load modules for a big speedupÆvar Arnfjörð Bjarmason, May 23, 2021
  61. 11/13 perl: lazily load some common Git.pm setup codeÆvar Arnfjörð Bjarmason, May 23, 2021
  62. 12/13 send-email: move trivial config handling to PerlÆvar Arnfjörð Bjarmason, May 23, 2021
  63. 13/13 perl: nano-optimize by replacing Cwd::cwd() with Cwd::getcwd()Ævar Arnfjörð Bjarmason, May 23, 2021
  64. Junio C HamanoMay 24, 2021
  65. 00/13 send-email: various optimizations to speed up by >2xÆvar Arnfjörð Bjarmason, May 24, 2021
  66. 01/13 send-email tests: support GIT_TEST_PERL_FATAL_WARNINGS=trueÆvar Arnfjörð Bjarmason, May 24, 2021
  67. 02/13 send-email tests: test for boolean variables without a valueÆvar Arnfjörð Bjarmason, May 24, 2021
  68. 03/13 send-email: remove non-working support for "sendemail.smtpssl"Ævar Arnfjörð Bjarmason, May 24, 2021
  69. 04/13 send-email: refactor sendemail.smtpencryption config parsingÆvar Arnfjörð Bjarmason, May 24, 2021
  70. 07/13 send-email: lazily shell out to "git var"Ævar Arnfjörð Bjarmason, May 24, 2021
  71. 06/13 send-email: lazily load config for a big speedupÆvar Arnfjörð Bjarmason, May 24, 2021
  72. 05/13 send-email: copy "config_regxp" into git-send-email.perlÆvar Arnfjörð Bjarmason, May 24, 2021
  73. 09/13 send-email: get rid of indirect object syntaxÆvar Arnfjörð Bjarmason, May 24, 2021
  74. 10/13 send-email: lazily load modules for a big speedupÆvar Arnfjörð Bjarmason, May 24, 2021
  75. Junio C HamanoMay 27, 2021
  76. Ævar Arnfjörð BjarmasonMay 27, 2021
  77. 11/13 perl: lazily load some common Git.pm setup codeÆvar Arnfjörð Bjarmason, May 24, 2021
  78. 12/13 send-email: move trivial config handling to PerlÆvar Arnfjörð Bjarmason, May 24, 2021
  79. Jeff KingMay 27, 2021
  80. 08/13 send-email: use function syntax instead of barewordsÆvar Arnfjörð Bjarmason, May 24, 2021
  81. 13/13 perl: nano-optimize by replacing Cwd::cwd() with Cwd::getcwd()Ævar Arnfjörð Bjarmason, May 24, 2021
  82. Jeff KingMay 27, 2021
  83. 00/13 send-email: various optimizations to speed up by >2xÆvar Arnfjörð Bjarmason, May 28, 2021
  84. 01/13 send-email tests: support GIT_TEST_PERL_FATAL_WARNINGS=trueÆvar Arnfjörð Bjarmason, May 28, 2021
  85. 03/13 send-email: remove non-working support for "sendemail.smtpssl"Ævar Arnfjörð Bjarmason, May 28, 2021
  86. 02/13 send-email tests: test for boolean variables without a valueÆvar Arnfjörð Bjarmason, May 28, 2021
  87. Jeff KingJul 10, 2021
  88. 04/13 send-email: refactor sendemail.smtpencryption config parsingÆvar Arnfjörð Bjarmason, May 28, 2021
  89. 06/13 send-email: lazily load config for a big speedupÆvar Arnfjörð Bjarmason, May 28, 2021
  90. 05/13 send-email: copy "config_regxp" into git-send-email.perlÆvar Arnfjörð Bjarmason, May 28, 2021
  91. 07/13 send-email: lazily shell out to "git var"Ævar Arnfjörð Bjarmason, May 28, 2021
  92. 09/13 send-email: get rid of indirect object syntaxÆvar Arnfjörð Bjarmason, May 28, 2021
  93. 08/13 send-email: use function syntax instead of barewordsÆvar Arnfjörð Bjarmason, May 28, 2021
  94. Felipe ContrerasMay 28, 2021
  95. Ævar Arnfjörð BjarmasonMay 29, 2021
  96. Felipe ContrerasMay 29, 2021
  97. 10/13 send-email: lazily load modules for a big speedupÆvar Arnfjörð Bjarmason, May 28, 2021
  98. Felipe ContrerasMay 28, 2021
  99. Ævar Arnfjörð BjarmasonMay 29, 2021
  100. Felipe ContrerasMay 29, 2021
  101. 12/13 send-email: move trivial config handling to PerlÆvar Arnfjörð Bjarmason, May 28, 2021
  102. 11/13 perl: lazily load some common Git.pm setup codeÆvar Arnfjörð Bjarmason, May 28, 2021
  103. 13/13 perl: nano-optimize by replacing Cwd::cwd() with Cwd::getcwd()Ævar Arnfjörð Bjarmason, May 28, 2021
  104. Felipe ContrerasMay 28, 2021
  105. Jeff KingMay 31, 2021
  106. Ævar Arnfjörð BjarmasonMay 31, 2021
  107. Jeff KingMay 31, 2021
  108. Elijah NewrenMay 27, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.