Skip to content

Deploy, walkLocal performance #13817

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

Merged
merged 3 commits into from
Jun 29, 2025
Merged

Conversation

davidejones
Copy link
Contributor

What is the purpose?

During hugo deploy we run walkLocal which iterates over the filesystem. At larger scale deploys I've noticed this can be slow.
This PR attempts to improve the performance by using a worker pool

Why?

To help improve deploy times

Example

Before my changes (just log changes)
2

After my changes
1

@davidejones davidejones marked this pull request as ready for review June 23, 2025 15:18
deploy/deploy.go Outdated
for path := range jobs {
info, err := fs.Stat(path)
if err != nil {
errs <- err
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the behaviour of the old code was to stop early on errors, and to me it makes sense to keep that.

Also see the para.Workers type in this repo that I think makes this pattern easier to read.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! i've tried updating this now

@bep bep merged commit dd6e2c8 into gohugoio:master Jun 29, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants