mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
d1ef6bf6045a9998d1a464645eb8d7a3d5f062cf
The runtime_stats component used a std::map<Component*, ComponentRuntimeStats> to record per-component timing data. Every loop iteration for every component required a red-black tree lookup to record its time, adding ~2-3µs of measurement overhead per component — often exceeding the actual work done by lightweight components like OTA idle checks. Move RuntimeStats struct directly onto Component (behind #ifdef USE_RUNTIME_STATS) so recording is a direct member access with zero lookup cost. The RuntimeStatsCollector now iterates App.components_ to collect stats instead of maintaining its own map, eliminating ~2KB of red-black tree code.
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%
