Files
DL6ER 1bc0f00d64 webserver: only raise the mbedTLS debug threshold when debug.tls is set
Our civetweb patch defined `MG_CONFIG_MBEDTLS_DEBUG 3` unconditionally, so `mod_mbedtls.inl` called `mbedtls_debug_set_threshold(3)` in every build. mbedTLS formats each message with `vsnprintf()` *before* it reaches `FTL_mbed_debug()`, which then discards it unless `debug.tls` is set - so release builds paid for formatting every message up to level 3 and threw the result away.

The threshold now follows `debug.tls` and is updated whenever the debug flags are (re)loaded, so toggling it at runtime keeps working. Measured on bulk HTTPS transfers, this is around 4% less CPU; under the pathological TLS read loop reported in #3095 the discarded formatting accounted for roughly a third of all samples.

Signed-off-by: DL6ER <dl6er@dl6er.de>
2026-09-19 16:16:20 +02:00
..
…
…