mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 00:31:58 +00:00
664baac09e97a9600554c0508eae020742f308d0
The on_log callback was constructing a temporary MQTTMessage struct which copied the log_message_ topic string and created a new std::string from the message buffer on every log line. This is called frequently at runtime and contributes to heap fragmentation. Use the const char* publish overload directly to avoid both allocations.
Description
Languages
C++
64.3%
Python
35.4%
C
0.2%
