]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: proxy: index proxy ID using compact trees
authorWilly Tarreau <w@1wt.eu>
Sat, 23 Aug 2025 17:57:29 +0000 (19:57 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Sep 2025 07:23:46 +0000 (09:23 +0200)
commit1a95bc42c7d4b2b48edc3323b353292f181cf7cb
treec9488304610d7289ca8dc659b71e9eb5e6a4a4c6
parenteab5b89dce86d0365ad4fb170abc641bb9cc88a5
MEDIUM: proxy: index proxy ID using compact trees

The proxy ID is currently stored as a 32-bit int using an eb32 tree.
It's used essentially to find holes in order to automatically assign IDs,
and to detect duplicates. Let's change this to use compact trees instead
in order to save 24 bytes in struct proxy for this node, plus 8 bytes in
the root (which is static so not much relevant here). Now the proxy is
3088 bytes large.
include/haproxy/proxy-t.h
include/haproxy/proxy.h
src/cfgparse-listen.c
src/cfgparse.c
src/cli.c
src/proxy.c