mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 08:55:36 +00:00
9bf90eff01b0959f463a5c62b8da06c998b92792
Replace the process_iterator_batch_ template (instantiated separately for ListEntitiesIterator and InitialStateIterator) with a single non-template method taking a ComponentIterator& base class reference. Both iterators inherit from ComponentIterator, and the template only called completed() and advance() which are both base class methods. The two template instantiations generated ~160 bytes of duplicate code in APIConnection::loop(). The single non-template version is 79 bytes, saving 61 bytes net flash and removing 140 bytes of cold connect/reconnect code from the hot loop path. Also move the duplicated completed() method from ListEntitiesIterator and InitialStateIterator to the ComponentIterator base class where state_ is defined.
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
545 MiB
Languages
C++
60.1%
Python
39.3%
C
0.3%
JavaScript
0.2%
