Thread (12 messages) 12 messages, 4 authors, 2022-10-25

Re: [PATCH] chainlint: colorize problem annotations and test delimiters

From: Jeff King <hidden>
Date: 2022-09-13 01:34:24

On Mon, Sep 12, 2022 at 08:30:02PM -0400, Eric Sunshine wrote:
This is indeed a lot of new processes, but this color interrogation is
done lazily, only if a problem is detected, so it should be zero-cost
in the (hopefully) normal case of a lint-clean script.

I had the exact same thought about the cost being paid by test-lib.sh
making all those `tput` invocations.
Ah, right, that's even better.

I wondered if we could use the same trick in test-lib.sh, but it does
color some output even on success. But on further thought, the reason
that I couldn't measure any impact of tput in my other message may have
just been because I was running under "prove". So there's no tty and
thus no coloring in the first place. Not to mention that I am using
--verbose-log, which also suppresses color.

So I suspect there is really nothing to speed up at all. Most cases
running all of the tests will end up turning off color anyway. And if
they are not, they are probably bottle-necked on the terminal speed. ;)

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help