ConfigureLog: Eliminate unnecessary flush to improve write performance

Replace `std::endl` with simple newline to eliminate performance issue
caused by a `write()` system call per line issued to the configure log.

The addition of the `find-v1` configure log item in commit e94ace226b
(Merge topic 'configure-log-find-v1', 2025-04-29, v4.1.0-rc1~266) caused
a large increase in the size of the configure log (1300 lines to 36000
lines in one test case) and exposed this latent performance issue.
It caused serious (10x) degradation in configure time when run on
common filesystems where `write()` is expensive, such as WSL or NFS.
This commit is contained in:
Peter Boettcher
2026-04-15 15:50:05 -04:00
committed by Brad King
parent 3856e2bfe0
commit 323cfece32
+1 -1
View File
@@ -120,7 +120,7 @@ cmsys::ofstream& cmConfigureLog::BeginLine()
void cmConfigureLog::EndLine()
{
this->Stream << std::endl;
this->Stream << '\n';
}
void cmConfigureLog::BeginArray()