mirror of
https://github.com/esphome/esphome.git
synced 2026-02-08 16:51:52 +00:00
e131_remove_vector_alloc
The received data was already in stack buffer buf[1460], but was being copied into a std::vector just to satisfy the packet_() signature. E1.31 runs at up to 44 Hz per universe, so this caused ~44 alloc/free cycles per second per universe. Change packet_() to accept const uint8_t* + size_t and pass the stack buffer directly. This is an internal method so there is no API breakage.
Description
Languages
C++
64.3%
Python
35.4%
C
0.2%
