Page MenuHomeFreeBSD

Optimize COPYTREE_*
ClosedPublic

Authored by mat on Oct 19 2016, 1:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 16 2024, 1:18 PM
Unknown Object (File)
Nov 3 2024, 3:36 AM
Unknown Object (File)
Nov 2 2024, 7:41 AM
Unknown Object (File)
Oct 18 2024, 2:03 PM
Unknown Object (File)
Oct 14 2024, 10:30 AM
Unknown Object (File)
Oct 6 2024, 8:34 AM
Unknown Object (File)
Oct 3 2024, 7:48 AM
Unknown Object (File)
Oct 3 2024, 12:23 AM
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

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.