J. Nick Koston
bd0705cdc0
[api] Store YAML service names in flash instead of heap
Reduces memory usage for YAML-defined API services by storing service
names and argument names as pointers to string literals in flash instead
of heap-allocated std::string objects.
Implementation:
- Created UserServiceBase<Ts...> for YAML services (const char* storage)
- Created UserServiceDynamic<Ts...> for custom_api_device (std::string storage)
- Updated CustomAPIDeviceService to inherit from UserServiceDynamic
- UserServiceTrigger uses UserServiceBase (YAML-only)
Memory savings per YAML service:
- 0 args: 32 bytes (57% reduction)
- 2 args: 48 bytes (60% reduction)
- 5 args: 96 bytes (63% reduction)
Custom API device services maintain same memory footprint (no regression).
Typical ESPHome device (2-5 services): 100-240 bytes saved
High-service device (10+ services): 400-800 bytes saved
2025-11-05 18:51:17 -06:00
..
2025-11-05 01:23:24 +00:00
2025-11-02 15:08:45 -06:00
2025-07-08 11:08:21 +12:00
2025-07-11 19:08:03 -10:00
2025-07-28 16:39:25 +12:00
2025-06-16 09:22:14 +12:00
2025-06-26 13:47:41 +12:00
2025-07-18 10:55:39 +12:00
2025-11-05 18:51:17 -06:00
2025-06-29 08:04:42 +12:00
2025-08-14 09:42:11 +12:00
2025-11-02 17:02:13 -06:00
2025-10-17 21:40:54 -10:00
2025-09-22 09:07:47 +12:00
2025-11-02 23:16:39 -06:00
2025-11-03 14:07:03 +13:00
2025-08-20 14:27:08 +12:00
2025-07-18 04:07:59 +00:00
2025-07-15 12:25:18 +12:00
2025-07-16 21:34:51 +12:00
2025-07-08 08:22:40 +12:00
2025-09-08 10:57:02 +12:00
2025-07-16 13:14:43 +12:00
2025-05-26 21:31:32 -05:00
2025-06-11 11:49:15 +12:00
2025-10-21 02:26:18 -05:00
2025-10-21 02:26:18 -05:00
2025-10-28 11:37:40 +13:00
2025-06-15 15:21:55 +12:00
2025-06-15 13:16:33 -05:00
2025-06-11 11:49:15 +12:00
2025-10-21 02:26:18 -05:00
2025-05-26 21:31:32 -05:00
2025-06-11 11:49:15 +12:00
2025-05-26 21:31:32 -05:00
2025-06-25 18:15:59 -05:00
2025-09-03 14:26:43 +12:00
2025-07-15 12:25:18 +12:00
2025-06-25 12:03:41 +00:00
2025-08-25 08:58:46 +12:00
2025-07-15 07:20:18 +00:00
2025-08-25 12:22:16 +12:00
2025-09-22 09:07:47 +12:00
2025-10-22 14:24:56 +13:00
2025-09-28 22:42:58 -05:00
2025-09-22 09:07:47 +12:00
2025-09-22 09:07:47 +12:00
2025-09-22 09:07:47 +12:00
2025-09-22 09:07:47 +12:00
2025-09-04 08:07:13 +12:00
2025-10-30 15:06:21 +13:00
2025-07-08 07:57:55 +12:00
2025-07-08 07:57:55 +12:00
2025-07-08 07:57:55 +12:00
2025-07-08 07:57:55 +12:00
2025-07-08 07:57:55 +12:00
2025-07-08 07:57:55 +12:00
2025-07-12 07:11:45 +12:00
2025-09-08 10:27:58 +12:00
2025-07-08 07:57:55 +12:00
2025-07-08 07:57:55 +12:00
2025-08-18 11:14:41 -04:00
2025-07-29 08:54:16 +12:00
2025-07-08 07:57:55 +12:00
2025-07-08 07:57:55 +12:00
2025-07-08 07:57:55 +12:00
2025-07-18 14:20:35 +12:00
2025-10-19 09:42:17 -10:00
2025-10-20 07:59:47 +13:00
2025-10-20 07:59:47 +13:00
2025-10-20 07:59:47 +13:00
2025-10-20 07:59:47 +13:00
2025-10-20 07:59:47 +13:00
2025-10-20 09:25:03 -10:00