mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-15 18:20:52 +00:00
ad14c2681b
The trace() function is convenient to avoid calling trace() when traces are not enabled, but there starts to be some callers which place complex expressions in their trace calls, which results in all of them to be evaluated before being passed as arguments to the trace() function. This needlessly wastes precious CPU cycles. Let's change the function for a macro, so that the arguments are now only evaluated when the surce has traces enabled. However having a generic macro being called "trace()" can easily cause conflicts with innocent code so we rename it "_trace". Just doing this has resulted in a 2.5% increase of the HTTP/1 request rate. |
||
---|---|---|
.. | ||
haproxy | ||
import |