Bryan Boreham e4789cf89f [PERF] PromQL: Reduce allocations when walking syntax tree
Currently it allocates at least once on every recursion, and since
`append` gives no extra space for 1 or 2 elements, will allocate
several times for even modestly complex expressions.

Instead, allocate space for 4 elements to begin, and defer adding
another until we need it.

Add a note that `path` may get overwritten; this was true previously.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2025-07-11 14:09:20 +01:00
..
2025-07-02 11:17:17 +02:00