mirror of
https://github.com/esphome/esphome.git
synced 2026-09-14 00:28:39 +00:00
8fbf102ef32f6ba9f0459abc54577550c0ccefb4
On ESPHOME_THREAD_SINGLE platforms (ESP8266), move the Millis64Impl::compute() body into the header so it can be inlined at call sites. The function is trivial: two static loads, a rollover branch (taken every ~49.7 days), a store, and a shift+add. The static storage (last_millis_, millis_major_) is declared as class statics in the header and defined in time_64.cpp so all TUs share one copy. Multi-threaded paths remain out-of-line in time_64.cpp. Also force-inline millis_64_from_() which wraps compute() — GCC was creating an $isra$ clone instead of inlining the wrapper. Verified on ESP8266 (xtensa-lx106): - Millis64Impl::compute() and millis_64_from_ symbols eliminated - Scheduler::call() idle path: zero out-of-line calls (was 1) - compute body inlined into 3 call sites (Scheduler::call, next_schedule_in, loop/millis_64)
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
594 MiB
Languages
C++
55.8%
Python
43.6%
C
0.3%
JavaScript
0.2%
