[PATCH] D90010: clang-tidy: Reduce number of stderr write calls
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 26 20:26:05 PDT 2020
dblaikie added a comment.
In D90010#2355421 <https://reviews.llvm.org/D90010#2355421>, @Hiralo wrote:
> In D90010#2352556 <https://reviews.llvm.org/D90010#2352556>, @njames93 wrote:
>
>> Isn't `llvm::errs()` buffered, negating most of the benefit here.
>
> If it is buffered, we would expect single write call to stderr. But we are seeing 7 write calls!
>
> Yes, please suggest how to make llvm::errs() buffered that will be easy patch :)
Looks like you might be able to do something like "llvm::errs().setBuffered()" ?
> In D90010#2352627 <https://reviews.llvm.org/D90010#2352627>, @dblaikie wrote:
>
>> (the patch description doesn't explain any specific motivation either - whether it's performance (runtime? memory usage? etc?) or something else, and how the performance aspect has been quantified)
>
> The motivation is to avoid 7 write calls which helps in large build system and easy on NFS!
Sorry, I meant "why does any of this matter" I take it you mean "because 7 write calls are slower than 1 in <this situation> by <this much time/percentage>" - do you have rough data/description of the situation where the speed of printing error messages matters and by how much does it matter? (I think it would be good to have this data no matter the solution - be it explicit or built-in buffering)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90010/new/
https://reviews.llvm.org/D90010
More information about the cfe-commits
mailing list