mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
c5e2f15889b8dfd75341b289394d388d25060751
Mirrors the bk72xx override: the ESP32 task WDT default timeout is 5s (CONFIG_ESP_TASK_WDT_TIMEOUT_S), so feeding every 1000ms keeps a ~5x safety margin while cutting per-iteration feed overhead substantially. esp_task_wdt_reset() takes a spinlock and walks the WDT task list, so every call costs tens of microseconds. At the normal ~62 Hz main loop the old 300ms cadence produced ~200 hits per 60s period; 1000ms cuts that to ~60 hits per 60s (-70%). Measured on a live ESP32 IDF build (gatetrigger.yaml) via runtime_stats: wdt bucket dropped from 2.24 us/iter to 1.56 us/iter - about 2.5 ms saved per 60s window, or ~0.7us/iter average. Component-level feeds inside component loop() and scheduler items are unaffected; they continue to call arch_feed_wdt after every operation, so any operation that exceeds this rate-limit triggers a real feed naturally. The rate-limit only applies to the outer guard in Application::loop() that fires when nothing else fed recently.
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%
