Re: [PATCH 0/3] t: add "test-tool genbytes" to avoid slow tr(1) on macOS
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 7, 2026, 23:04 UTC
- Message-ID
- <xmqq1p8w9rbf.fsf@gitster.g>
- In-Reply-To
- <pull.2301.git.1794063565.gitgitgadget@gmail.com>
"Kristofer Karlsson via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 8 quoted lines
> While looking for slow tests in CI, t4205 stood out on macOS: its EXPENSIVE > tests take several times longer there than on Linux. A CI experiment showed > that much of the time was spent in tr(1), which is very slow on macOS for > the 2GB of data that t4205 generates. > > Patch 1 renames test-genzeros.c so that the actual changes in patch 2 show > up as a regular diff. Patch 2 adds "genbytes" and uses it instead of > "genzeros | tr", which is where the speedup comes from.
Just being curious. Would forcing C locale on it help? I.e.,
genzeros | LANG=C LC_ALL=C tr ...