]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Optimize install(1) a bit.
authorEugene Grosbein <eugen@FreeBSD.org>
Fri, 10 Jul 2020 00:24:42 +0000 (00:24 +0000)
committerEugene Grosbein <eugen@FreeBSD.org>
Fri, 10 Jul 2020 00:24:42 +0000 (00:24 +0000)
commit2d68fac9bd995831e857ee04df6a7890e8210b4c
treec925c4396ae28ef77a1627fde09bd2d8849b8336
parent71dcf98ddf782eba94b952a7f78829c1359ddebe
Optimize install(1) a bit.

Currently, "install -s -S" behaviour is inefficient for upgrade.
First it finds that destination file already exists and copies
source file to temporary file. Then it calls strip(1)
with name of temporary file as single agrument and our strip(1) creates
another temporary file in the /tmp (or TMPDIR) making another copy
that is finally copied to DESTDIR third time.

Meantime, strip(1) has an option "-o dst" to specify destination
so install(1) is allowed to skip initial copying from obj to DESTDIR.
This change makes it do so.

Take a look at https://reviews.freebsd.org/D25551 for details
and efficiency numbers (in short: upto 32% gained for installword).

MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D25551
usr.bin/xinstall/xinstall.c