mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
5c4527905c99199e6fbeba88ca6eaeda751bfd6a
- Replace ProtoSize::varint() call for message_type with inline ternary using named constants, avoiding the noinline varint_slow call overhead in the write_protobuf_messages loop (-32 bytes on ESP8266 Xtensa). - Add named varint threshold constants (VARINT_MAX_1_BYTE, etc.) to ProtoSize class, used by both varint() and varint_wide(). - Devirtualize write_protobuf_packet by moving it to the base class as a non-virtual inline method. The plaintext and noise implementations only differed in footer handling, which is now unified via a conditional resize based on frame_footer_size_. This eliminates one vtable slot and allows the compiler to fully inline the thin wrapper into callers (-192 bytes total flash on ESP8266). - Include proto.h from api_frame_helper.h (no circular dependency) to support the inline definition, replacing the forward declaration of ProtoWriteBuffer.
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
546 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
