]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
chg: dev: Improve efficiency of ns_client_t reset
authorAlessio Podda <alessio@isc.org>
Thu, 10 Jul 2025 05:53:23 +0000 (05:53 +0000)
committerAlessio Podda <alessio@isc.org>
Thu, 10 Jul 2025 05:53:23 +0000 (05:53 +0000)
The ns_client_t struct is reset and zeroed out on every query,
but some fields (query, message, manager) are preserved.

We observe two things:
 - The sendbuf field is going to be overwritten anyway, there's
   no need to zero it out.
 - The fields are copied out when the struct is zero-ed out, and
   then copied back in. For the query field (which is 896 bytes)
   this is very inefficient.

This commit makes the reset more efficient by avoiding the unnecessary
zeroing and copying.

Merge branch 'alessio/experimental-ns-client-noinit' into 'main'

See merge request isc-projects/bind9!10463


Trivial merge