OPTIM: vars: do not keep variables usage stats if no limit is set
authorWilly Tarreau <w@1wt.eu>
Wed, 8 Sep 2021 13:51:06 +0000 (15:51 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Sep 2021 13:53:07 +0000 (15:53 +0200)
commit55f8a830dc339175767ddc638a06dd377091f84f
treec721ed789bf3e22287626d72c457656e73f73cea
parent3b78f2aa5ded32126fe20093d63d37d39d468e1a
OPTIM: vars: do not keep variables usage stats if no limit is set

The sole purpose of the variable's usage accounting is to enforce
limits at the session or process level, but very commonly these are not
set, yet the bookkeeping (especially at the process level) is extremely
expensive.

Let's simply disable it when the limits are not set. This further
increases the performance of 12 variables on 16-thread from 1.06M
to 1.24M req/s.
src/vars.c