chef-server
chef-server copied to clipboard
Find faster with fewer execs
chef-server-ctl reconfigure runs incredibly slow because it has to fork off chmod for every applicable file instead of targeting as many files as possible with a single chmod execution.
Before:
$ time sudo find /opt/cinc-project/embedded/lib/ruby/gems/*/gems -perm /u=x,g=x,o=x -exec chmod 755 {} \;
real 0m5.223s
user 0m0.004s
sys 0m0.006s
$ time sudo find /opt/cinc-project/embedded/lib/ruby/gems/*/gems -perm /u=r,g=r,o=r ! -perm /u=x -exec chmod 644 {} \;
real 0m22.883s
user 0m0.001s
sys 0m0.008s
almost 30 seconds 😭
After:
$ time sudo find /opt/cinc-project/embedded/lib/ruby/gems/*/gems -perm /u=x,g=x,o=x -exec chmod 755 {} \+
real 0m0.177s
user 0m0.006s
sys 0m0.013s
$ time sudo find /opt/cinc-project/embedded/lib/ruby/gems/*/gems -perm /u=r,g=r,o=r ! -perm /u=x -exec chmod 644 {} \+
real 0m0.312s
user 0m0.011s
sys 0m0.001s
about 0.5 seconds...
Deploy Preview for chef-server processing.
| Name | Link |
|---|---|
| Latest commit | 43f0d594a9f65004056c504609b7cde2a96c78fe |
| Latest deploy log | https://app.netlify.com/sites/chef-server/deploys/665792e82054b300080534ab |
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code