Page MenuHomeFreeBSD

Optimize COPYTREE_*
ClosedPublic

Authored by mat on Oct 19 2016, 1:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 11, 1:34 AM
Unknown Object (File)
Mon, Mar 10, 2:09 AM
Unknown Object (File)
Tue, Feb 25, 12:10 AM
Unknown Object (File)
Feb 7 2025, 3:05 AM
Unknown Object (File)
Feb 5 2025, 2:41 AM
Unknown Object (File)
Jan 31 2025, 7:02 AM
Unknown Object (File)
Jan 18 2025, 3:15 PM
Unknown Object (File)
Jan 5 2025, 2:56 PM
Subscribers
None

Details

Reviewers
None
Group Reviewers
portmgr
Commits
rP425793: Optimize COPYTREE_* macros.
Summary

The current chmod commands can't use -exec + because they fiddle with the
pathnames. By switching directory beforehand, it makes it possible to chmod
more than one file at once.

Test Plan

small benchmark, for what it's worth www/sit installs 2k files with a home baked version

www/sit (2k)www/mathjax (30k)
home baked0.032u 0.104s 0:00.13 100.0% 127+236k 4+0io 0pf+0w0.946u 7.446s 0:08.34 100.4% 40+225k 18276+31io 45pf+0w
current0.281u 0.649s 0:00.92 100.0% 37+171k 4+0io 0pf+0w5.446u 18.626s 0:23.99 100.2% 29+171k 18289+31io 0pf+0w
new0.024u 0.081s 0:00.10 100.0% 177+214k 4+0io 0pf+0w0.770u 7.012s 0:07.80 99.7% 41+197k 15444+31io 45pf+0w

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 5676
Build 5962: arc lint + arc unit

Event Timeline

mat retitled this revision from to Optimize COPYTREE_*.
mat updated this object.
mat edited the test plan for this revision. (Show Details)
  • Add a bit of a comment.
This comment was removed by mat.
  • Collapse two lines, make it more readable.
  • Use find -E

Three ports use -regex or -iregex with COPYTREE_*, I'm looking if they need fixing.
devel/ocaml-findlib devel/sdl12 databases/leo_center

Good, all three ports using it work just fine with find -E

  • Think about it and refactor with only one find for all the chmods.
This revision was automatically updated to reflect the committed changes.