J. Nick Koston 60dc18b80c [core] Use custom deleter for SchedulerItem unique_ptr to prevent destructor inlining
On BK7231N (Thumb-1/Cortex-M0), GCC inlines ~unique_ptr<SchedulerItem>
(~30 bytes: null check + ~std::function + operator delete) at every
destruction site, while ESP32/ESP8266/RTL8720CF outline it into a single
shared helper. This causes significant flash bloat in scheduler functions.

Use a custom deleter (SchedulerItemDeleter) with its operator() defined
in the .cpp file, ensuring the compiler emits exactly one copy of the
destruction code. All destruction sites now generate a simple function
call instead of inlining the full body.

BK7231N savings (bytes):
- call():           816 -> 670  (-146)
- process_to_add(): 390 -> 308  (-82)
- __adjust_heap:    430 -> 312  (-118)
- pop_raw_locked_(): 192 -> 140  (-52)
- cleanup_():       130 -> 112  (-18)
- SchedulerItemDeleter: +32 (new, single copy)
- Net: ~384 bytes saved

ESP32/ESP8266/RTL8720CF are unaffected (already outline the destructor).
2026-02-24 11:48:48 -06:00
2023-06-12 17:00:34 +12:00
2022-09-06 15:48:01 +12:00
2025-12-21 09:26:03 -05:00
2024-03-28 10:20:51 +13:00
2025-07-17 22:40:28 +12:00
2025-12-08 14:37:45 -05:00
2026-02-20 10:17:12 -05:00
2025-07-17 22:40:28 +12:00
2026-02-11 22:11:48 -05:00
2025-12-05 08:48:04 -05:00
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 496 MiB
Languages
C++ 64.1%
Python 35.5%
C 0.3%