mirror of
https://github.com/esphome/esphome.git
synced 2026-09-15 09:08:41 +00:00
Mark register_component_ as noinline to prevent setup() bloat
Without the template wrapper, the compiler inlines the 24-byte function at each of ~92 call sites in setup(), growing setup() by ~284 bytes. Force a function call instead. Co-Authored-By: J. Nick Koston <nick@koston.org>
This commit is contained in:
co-authored by
J. Nick Koston
parent
25ee5c9a28
commit
6d1a40f210
@@ -521,7 +521,7 @@ class Application {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void register_component_(Component *comp);
|
||||
__attribute__((noinline)) void register_component_(Component *comp);
|
||||
|
||||
void calculate_looping_components_();
|
||||
void add_looping_components_by_state_(bool match_loop_done);
|
||||
|
||||
Reference in New Issue
Block a user