Commit Graph
26515 Commits
Author SHA1 Message Date
J. Nick Koston 4d4ff0303d Merge remote-tracking branch 'upstream/dev' into integration 2026-04-03 10:03:23 -10:00
dependabot[bot]anddependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> f8f65c1a7b Bump click from 8.3.1 to 8.3.2 (#15421)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-03 09:42:37 -10:00
J. Nick Koston d90e2a6a9a [core] Use __builtin_ctz for FiniteSetMask bit scanning (#15400) 2026-04-03 08:28:54 -10:00
J. Nick Koston 4969fd6e99 [light] Use reciprocal multiply in normalize_color (#15401) 2026-04-03 08:28:41 -10:00
J. Nick Koston 95683b7416 [light] Pass LightTraits to avoid redundant virtual get_traits() calls (#15403) 2026-04-03 08:28:29 -10:00
J. Nick Koston 38f4dc3217 [uptime] Pass known length to publish_state to avoid redundant strlen (#15410) 2026-04-03 08:28:07 -10:00
J. Nick Koston f2a0d9943d [benchmarks] Add host platform benchmarks for text_sensor and button (#15407) 2026-04-03 08:27:55 -10:00
J. Nick Koston ea0227a206 [benchmarks] Add host platform benchmarks for number, select, and switch (#15405) 2026-04-03 08:27:44 -10:00
J. Nick Koston 5a23669747 [scheduler] Fix unrealistic scheduler benchmarks missing periodic drain (#15396) 2026-04-03 08:27:29 -10:00
J. Nick Koston 2a5933e4f7 [host] Add graceful shutdown on SIGINT/SIGTERM (#15387) 2026-04-03 08:27:13 -10:00
Jonathan Swoboda 6fecd72049 [ezo_pmp] Fix change_i2c_address action using wrong template type (#15393) 2026-04-03 08:35:16 -04:00
Clyde Stubbs 8360502a94 [ci] Fix deprecated-component matcher (#15417) 2026-04-03 08:01:04 -04:00
Jonathan Swoboda 5548a32771 [ili9xxx] Fix SPI MOSI pin validation never executing (#15399) 2026-04-03 21:15:51 +11:00
Clyde Stubbs 6f05e3d204 [ci] Run ci-custom.py as a pre-commit check (#15411) 2026-04-03 12:54:44 +11:00
Jonathan Swobodaandclydebarrow bcd8ddeabe [lvgl] Fix ext_click_area property application (#15394)
Co-authored-by: clydebarrow <2366188+clydebarrow@users.noreply.github.com>
2026-04-03 12:44:54 +11:00
Clyde Stubbs af662da90d [mipi_spi] Rotation and buffer size changes (#15047) 2026-04-03 12:28:45 +11:00
J. Nick Koston 3ba41c6f7e Merge remote-tracking branch 'upstream/select-switch-logv-downgrade' into integration 2026-04-02 15:12:38 -10:00
J. Nick Koston 363309a870 Merge remote-tracking branch 'upstream/uptime-text-sensor-pass-size' into integration 2026-04-02 15:12:30 -10:00
J. Nick Koston 5e471f45be Merge remote-tracking branch 'upstream/button-logv-downgrade' into integration 2026-04-02 15:12:17 -10:00
J. Nick Koston 288d98f5ef [uptime] Pass known length to publish_state to avoid redundant strlen 2026-04-02 15:11:00 -10:00
J. Nick Koston 59c33628a6 Downgrade button press logging from DEBUG to VERBOSE 2026-04-02 15:04:14 -10:00
J. Nick Koston 27522d7462 Add host platform benchmarks for text_sensor and button components 2026-04-02 14:57:39 -10:00
J. Nick Koston c8db8faab2 Merge branch 'bench-number-select-switch' into select-switch-logv-downgrade 2026-04-02 14:55:04 -10:00
J. Nick Koston 2058eda7fa Address review: fix misleading comment, remove unused constants 2026-04-02 14:54:28 -10:00
J. Nick Koston 46f8e46548 Downgrade select and switch control path logging from DEBUG to VERBOSE
The ESP_LOGD calls in SelectCall::perform() and Switch::turn_on/turn_off/toggle
are redundant with aioesphomeapi's state_log_formatter which already logs both
commands and state changes on the HA side. Benchmarks show these ESP_LOGD calls
dominate the control path cost (~13M ops/s for SelectCall vs ~180M ops/s for
publish_state).

This aligns select and switch with climate and fan which already use ESP_LOGV
for their call perform() paths.
2026-04-02 14:48:43 -10:00
J. Nick Koston 8a0d3158a0 Add host platform benchmarks for number, select, and switch components 2026-04-02 14:39:48 -10:00
J. Nick Koston 9e050c0106 Merge remote-tracking branch 'upstream/light-pass-traits' into integration 2026-04-02 14:03:53 -10:00
J. Nick Koston 9c757eae16 Merge remote-tracking branch 'upstream/light-normalize-mul' into integration 2026-04-02 14:03:49 -10:00
J. Nick Koston ea75bb83c4 Merge remote-tracking branch 'upstream/finite-set-mask-ctz' into integration 2026-04-02 14:03:44 -10:00
J. Nick Koston ded6465056 Fix clang-tidy: use uint64_t instead of unsigned long long 2026-04-02 13:59:41 -10:00
J. Nick Koston af41cc2d66 Address review: clamp to MAX_BITS, add ctzll branch for >32-bit masks
Clamp the __builtin_ctz result to MAX_BITS to match the original loop
semantics if out-of-range bits are ever present. Add ctzll branch for
hypothetical >32-bit bitmask types.
2026-04-02 13:48:36 -10:00
J. Nick Koston c35b36b8e7 [light] Pass LightTraits to compute_color_mode_ and transform_parameters_
Pass the already-fetched LightTraits from validate_() to
compute_color_mode_() and transform_parameters_() instead of each
calling get_traits() independently. This eliminates 2 redundant
virtual calls through output_->get_traits().

As a side effect, the compiler inlines both functions into validate_(),
eliminating their call overhead. Total hot path shrinks by 451 bytes.
2026-04-02 13:46:30 -10:00
J. Nick Koston bce8e6ecb6 Fix clang-tidy: add braces, use uint32_t instead of unsigned long 2026-04-02 13:41:18 -10:00
J. Nick Koston 4981b3c671 [light] Use reciprocal multiply in normalize_color
Replace 3 software float divides (__divsf3) with 1 divide + 3 native
mul.s instructions. Xtensa has no FPU divide, so __divsf3 is a ~20-30
cycle software routine. This saves ~40-60 cycles per normalize_color
call for +8 bytes of flash.
2026-04-02 13:36:48 -10:00
J. Nick Koston b4fa217ab3 [core] Use __builtin_ctz for find_lowest_set_bit in FiniteSetMask
Replace the linear bit-scanning loop in find_next_set_bit with
__builtin_ctz (compiles to single-cycle NSAU on Xtensa). Also rename
to find_lowest_set_bit and drop the unused start_bit parameter since
all call sites pass 0.

This eliminates the standalone find_next_set_bit function and replaces
3 function calls + loops in compute_color_mode_ with inline NSAU
instructions.
2026-04-02 13:33:42 -10:00
Keith Burzinski 710186998b [ota] Use modernized namespace syntax (#15398) 2026-04-02 19:12:05 -04:00
J. Nick Koston 8f49aab070 Merge branch 'scheduler-cancel-fast-path' into integration 2026-04-02 12:23:15 -10:00
J. Nick Koston 0fb534bb28 [scheduler] Skip cancel for anonymous items, add empty-container fast path
Two optimizations to reduce overhead in the scheduler hot path:

1. Skip cancel_item_locked_ entirely for anonymous items (STATIC_STRING
   with nullptr name) in set_timer_common_. These can never match any
   existing item, so the scan is pure waste. This is the common path
   for Component::defer(func).

2. Split mark_matching_items_removed_locked_ into an inline wrapper
   that checks for empty containers and a noinline slow path. This
   avoids the function call overhead when containers are empty, which
   is the common case for defer_queue_ and to_add_ after draining.
2026-04-02 11:57:57 -10:00
J. Nick Koston 4535b82483 [scheduler] Remove redundant Defer_UniqueID, keep anonymous + same-ID
UniqueID benchmark was unrealistic — unique IDs still ran
cancel_item_locked_ scanning all containers for matches that never
exist. Replace with just two meaningful defer variants:
- Defer: anonymous (nullptr name, skips cancel entirely)
- Defer_SameID: fixed ID (cancel-and-replace coalescing pattern)
2026-04-02 11:51:52 -10:00
J. Nick Koston ed14694e46 [scheduler] Add defer benchmark variants and fix anonymous defer path
- Scheduler_Defer: use nullptr name matching Component::defer(func)
  production pattern (skips cancel_item_locked_ entirely)
- Scheduler_Defer_SameID: fixed ID 0 measuring cancel-and-replace
  pattern for coalescing rapid updates
- Scheduler_Defer_UniqueID: unique IDs measuring cancel scan overhead
  when no match is found
2026-04-02 11:45:03 -10:00
J. Nick Koston ce5c36a02a [scheduler] Fix pool imbalance in benchmarks, add static_assert
Change kInnerIterations from 2000 to 2100 (divisible by batch sizes 3
and 10) to prevent pool imbalance at iteration boundaries that caused
spurious malloc. Add static_assert to each benchmark to catch this at
compile time.
2026-04-02 11:38:18 -10:00
J. Nick Koston 904577bf91 [scheduler] Extract warm_pool helper for scheduler benchmarks
Replace duplicated pool warmup blocks with a shared warm_pool() helper
that registers and replaces items twice to populate the recycling pool
before the benchmark loop begins.
2026-04-02 11:31:27 -10:00
J. Nick Koston be3e0c27bf [core] Inline fast path for enable_loop (#15392) 2026-04-02 21:28:12 +00:00
J. Nick Koston 279686b1c2 [scheduler] Add ExceedPool benchmark to measure pool overflow cliff
Add Scheduler_SetTimeout_ExceedPool with batch size 10 (exceeding
MAX_POOL_SIZE=5) to measure the performance impact when the recycling
pool is exhausted and items must be malloc'd/freed each cycle.
2026-04-02 11:26:28 -10:00
J. Nick Koston 615b2b339a [scheduler] Batch 3 registrations per call() for realistic worst case
Instead of draining after every single registration or batching 5,
use a batch size of 3 which represents a realistic worst case where
multiple components schedule in the same loop iteration while staying
within the recycling pool (MAX_POOL_SIZE=5).
2026-04-02 11:24:53 -10:00
J. Nick Koston 347f981768 [scheduler] Fix unrealistic scheduler benchmarks missing periodic drain
Scheduler registration benchmarks (SetTimeout, SetInterval, Defer) were
not calling scheduler.call() periodically to drain and clean up cancelled
items. In production, call() runs every loop iteration, keeping the
scheduler containers small. Without draining, cancelled items accumulated
causing O(n²) scan cost in cancel_item_locked_ that doesn't reflect
real-world behavior.

- SetTimeout: was only calling process_to_add() (no cleanup), now calls
  call() every kKeyCount iterations
- SetInterval: was calling process_to_add() (no cleanup of items_), now
  calls call() for proper cleanup
- Defer: was never draining the defer queue, now calls call() to process
  deferred items as production does
- All three now advance time (++now) to match production loop behavior
2026-04-02 11:18:17 -10:00
Jonathan Swoboda 4d0d3cc271 [sen5x] Remove dead voc_baseline config option (#15391) 2026-04-02 10:53:53 -10:00
Jonathan Swoboda 4134763f34 [at581x][canbus] Fix walrus operator skipping falsy config values (#15390) 2026-04-02 20:32:10 +00:00
Edward Firmopre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>J. Nick KostonJ. Nick Koston
1e72f0ee5a [nextion] Gate waveform code behind USE_NEXTION_WAVEFORM, use StaticRingBuffer (#15273)
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
Co-authored-by: J. Nick Koston <nick+github@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
2026-04-02 20:17:20 +00:00
J. Nick Koston 67238e3d74 Merge remote-tracking branch 'upstream/dev' into integration
# Conflicts:
#	tests/components/time/posix_tz_parser.cpp
2026-04-02 10:13:20 -10:00