cmake: speed up libcurl doc builds again#13207
Closed
vszakats wants to merge 1 commit intocurl:masterfrom
Closed
Conversation
This time limit the number of files per command to avoid exceeding limitations of certain OS/shell envs. Such known env is Windows with the `cmd.exe` shell, which features an 8K limit to this day. Allowlisting `UNIX` to have no limit and using a limit of 200 for other envs to be safe. If there is a way to detect `cmd.exe` and/or we know which precise envs are sensitive to this, we can tweak these conditions further. Even with the low limit, this patch reduces external commands by 200x, making builds much faster. Ref: curl#13047 Ref: curl#12762 2620aa9 Closes #xxxxx
Member
|
Does this still work correctly if you update a single |
Member
Author
|
It does, yes. Confirmed with a macOS and a Windows cross-build. In the latter, it rebuilds a batch of 200 files in which the modified one is present, on macOS, it rebuilds all. It's instantaneous, even on an ancient machine. |
bagder
approved these changes
Mar 28, 2024
Member
|
I tried this change out in a Windows 10 VM by building with cmake mingw makefiles and the difference compared to the parent commit is significant. It cut build time by 50 seconds.
yes |
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Aug 29, 2024
Before this patch the targe OS was used, which prevented building libcurl manpages in larger batches in cross-builds targeting e.g. Windows. Update the condition to use `CMAKE_HOST_UNIX` instead of `UNIX`. This variable has been available since CMake 2.6.0: Kitware/CMake@176fe63 Follow-up to bb84f82 curl#13207
vszakats
added a commit
that referenced
this pull request
Aug 30, 2024
Before this patch the targe OS was used, which prevented building libcurl manpages in larger batches in cross-builds targeting e.g. Windows. Update the condition to use `CMAKE_HOST_UNIX` instead of `UNIX`. This variable has been available since CMake 2.6.0: Kitware/CMake@176fe63 Follow-up to bb84f82 #13207 Closes #14733
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This time limit the number of files per command to avoid exceeding limitations of certain OS/shell envs.
Such known env is Windows with the
cmd.exeshell, which features an 8K command-line length limit to this day.Allowlisting
UNIXto have no limit and using a limit of 200 for all other envs to be safe. If there is a way to detectcmd.exeand/or we know which precise envs are sensitive to this, we can tweak these conditions further.Even with the low limit, this patch reduces external commands by 200x, making full and CI builds much faster.
Ref: #12762 2620aa9 (initial)
Ref: #13047 f03c856 (revert)
Closes #13207