mirror of
https://github.com/esphome/esphome.git
synced 2026-09-03 19:46:02 +00:00
85e818dda7f07679672f1b22761cf3981409494e
The API protobuf write path uses a shared buffer that gets resize()'d on every message send. std::vector::resize() zero-fills new bytes, but every byte is overwritten by the encoder before being read. For a 16-advertisement BLE proxy batch, this wastes ~1300 bytes of memset per flush (~10x/second). ProtoByteBuffer is a minimal replacement that skips zero-initialization on resize(). On ESP32/RP2040/LibreTiny it also skips zero-fill on allocation via make_unique_for_overwrite. On ESP8266 it falls back to make_unique (zero-fills on alloc, but resize still doesn't zero-fill — the main win is preserved since reserve is typically a no-op after warmup).
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
582 MiB
Languages
C++
56%
Python
43.4%
C
0.3%
JavaScript
0.2%
