MEDIUM: filters: Use macros to call filters callbacks to speed-up processing
authorChristopher Faulet <cfaulet@qualys.com>
Tue, 24 Nov 2015 15:24:13 +0000 (16:24 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 9 Feb 2016 13:53:15 +0000 (14:53 +0100)
commit3e34429515912c34d6f63e8b58bb5cb5bf3096fe
tree5dc8ad2c3401946b6d77374ba3a9a9473fa12767
parent92d3638d2d2c2bf23bbe5d81b0e1d14a6088f48d
MEDIUM: filters: Use macros to call filters callbacks to speed-up processing

When no filter is attached to the stream, the CPU footprint due to the calls to
filters_* functions is huge, especially for chunk-encoded messages. Using macros
to check if we have some filters or not is a great improvement.

Furthermore, instead of checking the filter list emptiness, we introduce a flag
to know if filters are attached or not to a stream.
include/proto/filters.h
include/types/stream.h
src/filters.c
src/proto_http.c
src/stream.c