]> git.ipfire.org Git - thirdparty/haproxy.git/commit
OPTIM: resolvers: move the eb32 node before the data in the answer_item
authorWilly Tarreau <w@1wt.eu>
Thu, 21 Oct 2021 12:45:28 +0000 (14:45 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 21 Oct 2021 13:28:24 +0000 (15:28 +0200)
commit9628c422846c29d1ec479d326adf937c5dab63cc
tree0e9bd163cf01370c927416764911a495d584e9b2
parentdd362b7b24ea24d8f3c882dab1a69cf78af7cc90
OPTIM: resolvers: move the eb32 node before the data in the answer_item

perf top shows that we spend a lot of time trying to read item->type in
the lookup loop, because the node is placed after the very long name,
so when the node is found, no data is in the cache yet. Let's simply
move the node upper in the struct. This results in the CPU usage of
resolv_validate_dns_response() to drop by 4 points.
include/haproxy/resolvers-t.h