Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: speed up libcurl doc builds again #13207

Closed
wants to merge 1 commit into from

Conversation

vszakats
Copy link
Member

@vszakats vszakats commented Mar 27, 2024

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 command-line length limit to this day.

Allowlisting UNIX to have no limit and using a limit of 200 for all 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 full and CI builds much faster.

Ref: #12762 2620aa9 (initial)
Ref: #13047 f03c856 (revert)

Closes #13207

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
@github-actions github-actions bot added the build label Mar 27, 2024
@vszakats vszakats changed the title cmake: speed up libcurl doc building again cmake: speed up libcurl doc builds again Mar 27, 2024
@bagder
Copy link
Member

bagder commented Mar 28, 2024

Does this still work correctly if you update a single .md file and run make again?

@vszakats
Copy link
Member Author

vszakats commented Mar 28, 2024

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.

@jay
Copy link
Member

jay commented Apr 1, 2024

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.

Does this still work correctly if you update a single .md file and run make again?

yes

@vszakats vszakats closed this in bb84f82 Apr 4, 2024
@vszakats vszakats deleted the cmake-fast-libcurl-docs branch April 4, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants