]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: server: index server ID using compact trees
authorWilly Tarreau <w@1wt.eu>
Sun, 24 Aug 2025 09:21:02 +0000 (11:21 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Sep 2025 07:23:46 +0000 (09:23 +0200)
commitd18d972b1f430684ff90683703de4e18650f0615
tree3468dc73b432a3efcd29532eec12baed3fcb19a8
parent66191584d132640ce704d1794bc37c4b57a3168d
MEDIUM: server: index server ID using compact trees

The server 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 server for this node, plus 8 bytes in
struct proxy. The server struct is still 3904 bytes large (due to
alignment) and the proxy struct is 3072.
include/haproxy/proxy-t.h
include/haproxy/server-t.h
include/haproxy/server.h
src/cfgparse.c
src/proxy.c
src/server.c