HomeFreeBSD

Speed up *-old-* make targets by using sed instead of xargs

Description

Speed up *-old-* make targets by using sed instead of xargs

Targets like 'list-old-files' used "xargs -n1" to produce a list with
one file per line. Using xargs resulted in one fork+exec for each
Argument, resulting in rather long runtime. Instead, use sed to split
the list. On one machine make list-old-files took 30s wall clock time
with xargs and less than 1s with sed.

Reviewed by: jhb
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D34741

Details

Provenance
emasteAuthored on Apr 1 2022, 10:58 PM
Reviewer
jhb
Differential Revision
D34741: Speed up *-old-* make targets by using sed instead of xargs
Parents
rG27f889cf4124: if_mvneta: Remove unused variables.
Branches
Unknown
Tags
Unknown