]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: patterns: reorganize pattern reference elements
authorMaxime Henrion <mhenrion@haproxy.com>
Thu, 18 Dec 2025 04:37:44 +0000 (23:37 -0500)
committerWilly Tarreau <w@1wt.eu>
Tue, 23 Dec 2025 20:17:39 +0000 (21:17 +0100)
commit545cf59b6fdccf68c4368a9157ef3fbd1a58a8b9
treea875855512e3e56e667661763488c8c5d24933a8
parent5547bedebb3136287b71309dae8761b4d0be3a79
MEDIUM: patterns: reorganize pattern reference elements

Instead of a global list (and tree) of pattern reference elements, we
now have an intermediate pat_ref_gen structure and store the elements in
those. This simplifies the logic of some operations such as commit and
clear, and improves performance in some cases - numbers to be provided
in a subsequent commit after one important optimization is added.

A lot of the changes are due to adding an extra level of indirection,
changing many cases where we iterate over all elements to an outer loop
iterating over the generation and an inner one iterating over the
elements of the current generation. It is therefore easier to read this
patch using 'git diff -w'.
include/haproxy/pattern-t.h
include/haproxy/pattern.h
src/hlua_fcn.c
src/map.c
src/pattern.c