mirror of
https://github.com/esphome/esphome.git
synced 2026-02-19 07:55:35 -07: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
373 MiB
Languages
C++
64.2%
Python
35.5%
C
0.2%
