mirror of
https://github.com/esphome/esphome.git
synced 2026-09-11 23:37:34 +00:00
5926ca5369843c8e99df7f2d57e843243b644117
Separate Application::feed_wdt() into two entry points so the hot path callers stop paying for the time==0 check they never trigger: - feed_wdt_with_time(time): inline, hot path. Rate-limit check in 3 Xtensa instructions (load + sub + branch). [[unlikely]] tells the compiler the slow branch is rare so the common path stays fall-through. - feed_wdt(): cold, out of line. Fetches millis() and forwards through the same rate limit. Used by setup loops, upload helpers, yield(), and any other non-hot caller. feed_wdt_slow_() is now pure worker code — 11 bytes. It just calls arch_feed_wdt(), updates last_wdt_feed_, and runs the status LED re-dispatch. Both entries have already confirmed the rate limit was exceeded before calling. Hot call sites updated: - Application::loop() per-component feed - Scheduler::execute_item_() after each scheduled item runs - Application::teardown_components() inner loop (already has 'now')
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
591 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
