Commit Graph
14138 Commits
Author SHA1 Message Date
J. Nick Koston b236d09734 [api] Move add_item/add_item_front inline and remove push_item
Both are only called from one site each. Moving them inline lets the
compiler inline push_back directly into the caller without a function
call barrier. Removes the now-unnecessary push_item wrapper.
2026-04-01 09:56:44 -10:00
J. Nick Koston 83f8a95e28 [api] Flatten add_item and add_item_front to inline push_back
Add __attribute__((flatten)) to add_item and add_item_front so the
compiler inlines push_item → push_back and all their callees directly
into these functions, eliminating the function call barrier.
2026-04-01 09:55:02 -10:00
J. Nick Koston 44be29789a [api] Inline push_item to allow push_back to be inlined into caller
The out-of-line push_item with __attribute__((flatten)) inlined
push_back's callees into push_item, but push_item itself remained
a function call barrier. Moving push_item inline lets the compiler
inline push_back into the actual call sites (add_item, add_item_front).
2026-04-01 09:53:37 -10:00
J. Nick Koston 18b00fb3fc [api] Revert push_item inline — CodSpeed shows 46% regression
Inlining push_item into add_item bloated the dedup loop, causing
the compiler to make worse inlining decisions. Total time went from
44µs to 64.5µs. Restore out-of-line with __attribute__((flatten))
which keeps add_item's dedup loop tight while still inlining
push_back's callees into push_item.
2026-04-01 09:51:55 -10:00
J. Nick Koston 2b8d4af1e7 [api] Inline DeferredBatch::push_item to avoid call overhead
push_item was defined out-of-line in the .cpp to avoid duplicate
_M_realloc_insert instantiation, but the function call overhead
on every add_item was visible in benchmarks. Move it inline since
it's a one-liner wrapper around push_back.
2026-04-01 09:46:04 -10:00
J. Nick Koston d82cc0c08a [api] Guard benchmark friend declarations with USE_BENCHMARK 2026-04-01 09:43:47 -10:00
J. Nick Koston 34cbe0abe1 [api] Fix stale comment: 1MB → 16MB socket buffers 2026-04-01 09:40:25 -10:00
J. Nick Koston 9fb8594a16 [api] Fix lint false positive on 'byte' in comment 2026-04-01 09:06:07 -10:00
J. Nick Koston c09d5d783c [api] Fix immediate benchmark to set batch_delay=0
should_send_immediately_ requires both should_try_send_immediately
flag AND batch_delay==0. Without setting batch_delay to 0, all
sends were falling back to the batch path.
2026-04-01 09:00:59 -10:00
J. Nick Koston d717c7b46c [api] Use large socket buffers and remove mid-loop draining
Increase socket buffer to 16MB so benchmarks never hit WOULD_BLOCK
during an inner loop iteration. Remove per-iteration drain_socket
calls that were adding noise and causing the immediate path to
fall back to batching. Drain only between outer iterations.
2026-04-01 08:54:30 -10:00
J. Nick Koston f469a7ced2 [api] Add process_batch benchmarks for single and multi-sensor
Add ProcessBatch_SingleSensor and ProcessBatch_5Sensors benchmarks
that measure the full batch processing path: queue → process_batch_ →
dispatch → encode → frame → TCP write.
2026-04-01 08:49:33 -10:00
J. Nick Koston 3a4a88df29 [api] Add warm batch benchmark and bench_clear_batch friend
Add SendSensorState_Batch_Warm that pre-warms the deferred batch vector
before benchmarking to isolate steady-state cost from allocation.
2026-04-01 08:43:38 -10:00
J. Nick Koston d3f3f89c59 [api] Extract shared TCP loopback helper for API benchmarks
Deduplicate the TCP loopback socket setup between bench_plaintext_frame
and bench_send_sensor_state into a shared bench_helpers.h header.
2026-04-01 07:48:12 -10:00
J. Nick Koston dcac526a34 [api] Add send_sensor_state benchmarks
Add benchmarks for the full send_sensor_state path covering both
immediate send and batch paths. This measures the end-to-end cost
of sending a sensor state update through an APIConnection including
entity field population, proto encode, framing, and TCP write.
2026-04-01 07:42:58 -10:00
Rene GucaandRene 212b3e1688 [cover] move time_based_cover to its own subdirectory (#15313)
Co-authored-by: Rene <rene@guca.at>
2026-03-31 21:59:24 -04:00
Kevin Ahrendt 31a70ab299 [resampler] Future-proof resampler task to avoid potential memory leaks (#15186) 2026-03-31 21:44:54 -04:00
Christian Handpre-commit-ci-lite[bot] 8f2cf8b8a7 [bmp581_base] Add support for BMP585 (#15277)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-31 21:39:41 -04:00
954227b203 [esp32_ble_tracker] Restart BLE scan after OTA failure (#15308)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2026-03-31 23:26:26 +00:00
Kevin Ahrendt 4a23ba7d8a [mixer] Fix memory leak in mixer task on stop/start cycles (#15185) 2026-04-01 12:06:48 +13:00
Edward Firmo b71c406e70 [uart] fix baud rate not applied on load_settings() for ESP32 (IDF) (#15341) 2026-04-01 12:04:07 +13:00
Jesse Hills 15bcd62f22 [internal_temperature] Move code into platform specific files (#15339) 2026-04-01 11:59:53 +13:00
J. Nick Koston 23dcc5389d [time] Fix strftime %Z and %z returning wrong timezone (#15330) 2026-04-01 11:59:45 +13:00
Jonathan Swoboda 9dca7e0daf [tormatic] Fix UART stream desync on ESP32 (#15337) 2026-03-31 18:01:33 -04:00
Clyde StubbsandJesse Hills 66b6d36a26 [lvgl] Fixes #3 (#15304)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
2026-04-01 10:04:10 +13:00
Jonathan Swoboda 2064eef273 [esp32_hosted] Guard against empty firmware URL in perform() (#15338) 2026-03-31 10:53:12 -10:00
dependabot[bot] 64e836f9c8 Bump CodSpeedHQ/action from 4.12.1 to 4.13.0 (#15340)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-31 10:49:17 -10:00
2cb987095d [modbus] Share helper functions across modbus components - part B (#14172)
Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-31 10:48:16 -10:00
Clyde Stubbs da6c4e20fe [lvgl] Fixes #2 (#15161) 2026-04-01 09:29:57 +13:00
Keith Burzinski 26b426bbff [zwave_proxy] Clear Home ID on USB modem disconnect (#15327) 2026-03-31 14:34:16 -05:00
J. Nick Koston 2449aa75af [http_request] Fix crash when esp_http_client_init fails (#15328) 2026-03-31 07:45:23 -10:00
J. Nick Koston 2c9a3051d6 [api] Use memcpy for fixed32 decode on little-endian platforms (#15292) 2026-03-31 07:43:18 -10:00
J. Nick Koston 9b97e95cf3 [binary_sensor] Add on_multi_click integration test (#15329) 2026-03-31 07:42:12 -10:00
J. Nick Koston c64bc24960 [preferences] Reduce log verbosity for unchanged NVS/FDB writes (#15332) 2026-03-31 07:34:54 -10:00
Jonathan Swoboda ceb3cb2ae7 [haier] Fix hOn half-degree temperature setting (#15312) 2026-03-31 15:22:29 +00:00
J. Nick Koston a3913b98ba [wifi] Move LibreTiny WiFi STA state to member variable (#15305) 2026-03-30 17:05:48 -10:00
Guillermo Ruffino ef65e47bc5 [schema] generator fixes (#15276) 2026-03-31 13:08:50 +13:00
Jonathan Swoboda 53b2a03c80 [multiple] Fix -Wformat and -Wextra warnings across 33 component files (#15321) 2026-03-30 18:56:05 -04:00
dependabot[bot] 58df755d8b Bump requests from 2.33.0 to 2.33.1 (#15324) 2026-03-30 12:27:30 -10:00
Ardumine c5eb0eb984 [internal_temperature] Add nRF52 Zephyr support (#15297) 2026-03-31 10:50:11 +13:00
Clyde Stubbs f25fa71235 [lvgl] Fix align_to directives (#15311) 2026-03-31 07:25:15 +11:00
J. Nick Koston 8561a8c495 [core] Suppress component source overflow warnings in testing mode (#15320) 2026-03-30 08:48:04 -10:00
J. Nick Koston 8688ef7125 [benchmark] Fix decode benchmarks being optimized away by compiler (#15293) 2026-03-30 08:24:48 -10:00
J. Nick Koston 46ea61666e [wifi] Replace FreeRTOS queue with LockFreeQueue on ESP-IDF (#15306) 2026-03-30 08:24:34 -10:00
J. Nick Koston 8969eb76e9 [wifi] Avoid redundant SDK calls in WiFi loop on ESP8266 (#15303) 2026-03-30 08:24:17 -10:00
J. Nick Koston ffee4c22b3 [esp32_ble] Devirtualize BLE event handler dispatch (#15310) 2026-03-30 08:21:58 -10:00
J. Nick Koston ad3f6ae313 [automation] Remove actions_end_ pointer from ActionList to save RAM (#15283) 2026-03-30 08:20:52 -10:00
Keith Burzinski b579758c46 [dht] Code clean-up (#15271) 2026-03-30 13:15:37 -05:00
Keith Burzinski 45e6d49d36 [shtcx] Code clean-up (#15261) 2026-03-30 13:15:27 -05:00
Keith Burzinski ddb188e8f0 [bme68x_bsec2] Fix warning spam, code clean-up (#15258) 2026-03-30 13:15:13 -05:00
Keith Burzinski 1a86e88373 [thermostat] Fix stale max_runtime_exceeded causing spurious supplemental heating/cooling (#15274) 2026-03-30 13:15:02 -05:00