Skip to content

Conversation

@peterisr
Copy link
Contributor

Describe your changes

Using the -exec command {} + (instead of ;) action of find, we can improve the performance of fix-permissions script significantly. The difference between the two is that the former (+) invokes a single process and passes all the files to it as arguments, whereas the latter (;) invokes one process per matched file resulting in thousands of chmod runs per build.

My benchmarks show about a 30 second improvement in steps that involve fix-permissions for the build-all target of make. More importantly for me, user defined Docker images, which use the fix-permissions script, will also show perf improvements.

Issue ticket if applicable

n/a

Checklist (especially for first-time contributors)

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests
  • I will try not to use force-push to make the review process easier for reviewers
  • I have updated the documentation for significant changes

@mathbunnyru
Copy link
Member

Thank you, merging this one 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants