]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: listener: index listener ID using compact trees
authorWilly Tarreau <w@1wt.eu>
Sun, 24 Aug 2025 09:12:49 +0000 (11:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Sep 2025 07:23:46 +0000 (09:23 +0200)
commit66191584d132640ce704d1794bc37c4b57a3168d
tree21eb9e52c8449cc10de44f2e74242d1bc21e2c92
parent1a95bc42c7d4b2b48edc3323b353292f181cf7cb
MEDIUM: listener: index listener ID using compact trees

The listener 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 listener for this node, plus 8 bytes
in struct proxy. The struct listener is now 704 bytes large, and the
struct proxy 3080.
include/haproxy/listener-t.h
include/haproxy/listener.h
include/haproxy/proxy-t.h
src/cfgparse.c
src/listener.c
src/proxy.c