]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: ip: Do not call getsecs so much
authorEmmanuel Vadot <manu@FreeBSD.org>
Thu, 9 Dec 2021 14:46:39 +0000 (15:46 +0100)
committerEmmanuel Vadot <manu@FreeBSD.org>
Thu, 13 Jan 2022 07:56:00 +0000 (08:56 +0100)
commit4003cdd81b8776cb451395ffa53423ad52328bc9
tree54f11d4462c6e6814c32891d74584aa5918655ca
parente3ef89ba96730180f55b9fc6af4c29e1482b9ac6
loader: ip: Do not call getsecs so much

getsecs is very costly, reuse the values we got before.

Fetching a ~30MB kernel with the tftp command use to take ~26 seconds
and now it's ~18 seconds.

Reviewed by: imp, tsoome
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33408

(cherry picked from commit c5f24f5e0db24c8e33e6278a4fbb7e68364ca18d)
stand/libsa/net.c