mirror of
https://github.com/esphome/esphome.git
synced 2025-03-14 06:38:17 +00:00
SML component is issuing constant warnings about high latencies: ``` [17:13:31][W][component:237]: Component sml took a long time for an operation (87 ms). [17:13:31][W][component:238]: Components should block for at most 30 ms. ``` This change replaces std::vector with a new Span class inspired in C++20 std::span, removing associated memory allocations and reducing latencies in a ESP32-S2 from 120-130ms to 50-60ms when DEBUG logs are enabled, and from 80-90ms to less than 30ms when not. Once all frameworks use C++20, we can remove the Span class and use std::span instead.
Description
Languages
C++
70.5%
Python
29.2%
C
0.1%