Commit Graph
26231 Commits
Author SHA1 Message Date
J. Nick Koston a6219434b9 Move core benchmarks to tests/benchmarks/core/
Core is not a component — its benchmarks belong in tests/benchmarks/core/
not tests/benchmarks/components/core/. Add extra_include_dirs parameter
to build_and_run to support non-component benchmark directories.
2026-03-16 20:52:53 -10:00
J. Nick Koston 9c148da76a Add core benchmarks dir, fix core pseudo-component, use simulation mode
- Move scheduler/loop/helpers benchmarks to tests/benchmarks/components/core/
- Add random_float and random_uint32 benchmarks (from ol.yaml)
- Fix core pseudo-component crash: skip components where get_component()
  returns None when adding dependencies to config
- Use CodSpeed simulation mode (CPU instruction counting) for reproducible
  CI results instead of walltime
2026-03-16 20:49:48 -10:00
J. Nick Koston d9cab03c09 Move benchmarks into ci.yml with determine-jobs integration
- Add should_run_benchmarks() to determine-jobs.py that checks if
  directly changed components have benchmark files (no dependency
  expansion - changing sensor won't trigger api benchmarks)
- Move benchmark job from separate workflow into ci.yml
- Pin CodSpeed action to full commit SHA
- Delete separate ci-benchmarks.yml
2026-03-16 20:44:37 -10:00
J. Nick Koston 38ff332fec [core] Add CodSpeed C++ benchmarks for protobuf and main loop
Add automated benchmarks using Google Benchmark to prevent performance
regressions in the API protobuf encoding/decoding and core loop paths.

Benchmarks cover:
- Protobuf encode: SensorState, BinarySensorState, HelloResponse,
  LightState, DeviceInfoResponse (20 nested devices + 20 areas)
- Protobuf decode: HelloRequest, SwitchCommand, LightCommand
- Protobuf calculate_size and full calc+encode send path
- Varint parse/encode/size for various value ranges
- Scheduler call/next_schedule_in with idle and active timers
- Application loop component dispatch and blocking guard overhead

Infrastructure:
- Extract shared build logic from cpp_unit_test.py into test_helpers.py
- Add cpp_benchmark.py mirroring the unit test build pattern
- Support benchmark.yaml per component dir for declaring dependencies
- Add CodSpeed CI workflow triggered on api/core changes
- Fix ProtoMessage protected destructor on host platform
2026-03-16 19:25:46 -10:00
J. Nick Koston dc6ea492bc make tidy happen even though compiler would strip it anywyas 2026-03-16 17:34:25 -10:00
J. Nick Koston 81497d8a45 Merge remote-tracking branch 'origin/integration' into integration 2026-03-16 17:24:39 -10:00
J. Nick Koston 39019ef078 Merge remote-tracking branch 'upstream/fnv1-hash-no-concat' into integration 2026-03-16 17:24:24 -10:00
J. Nick Koston 8525439dc8 [debug] [bme680_bsec] Use fnv1_hash_extend to avoid temporary string allocations
Replace fnv1_hash(str1 + str2) with fnv1_hash_extend(fnv1_hash(str1), str2)
to avoid constructing temporary std::string objects just to compute a hash.
This eliminates the only callers of operator+(const char*, StringRef),
allowing the linker to drop 197 bytes of string concatenation code.
2026-03-16 17:23:10 -10:00
J. Nick Koston 0069b736a4 Merge remote-tracking branch 'origin/ble-server-inline-is-active' into integration 2026-03-16 16:42:29 -10:00
J. Nick KostonandCopilot Autofix powered by AI 9242895f87 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-16 16:42:14 -10:00
J. Nick Koston 8b87440c64 Merge branch 'integration' of https://github.com/esphome/esphome into integration 2026-03-16 16:39:39 -10:00
J. Nick Koston 714628b547 Merge remote-tracking branch 'upstream/ble-server-inline-is-active' into integration 2026-03-16 16:39:15 -10:00
J. Nick Koston 3f74f4216c Merge remote-tracking branch 'upstream/socket-lwip-raw-udp' into integration 2026-03-16 16:39:04 -10:00
J. Nick Koston b333bb76e4 Merge branch 'dev' into socket-lwip-raw-udp 2026-03-16 16:36:46 -10:00
J. Nick Koston 2fe09b1e94 [esp32_ble, esp32_ble_server] Inline is_active/is_running and remove STL bloat from BLE server loop
Move ESP32BLE::is_active() and BLEServer::is_running() to headers
with ESPHOME_ALWAYS_INLINE to eliminate cross-TU call overhead on
every loop iteration. Replace std::remove_if + erase in
BLEServer::loop() with a simple index-based compacting loop,
removing ~250 bytes of unrolled STL template machinery.
2026-03-16 16:36:43 -10:00
J. Nick Koston 273637b6d7 tweak 2026-03-16 16:35:32 -10:00
J. Nick Koston 93b103be0e Merge remote-tracking branch 'origin/ble-server-inline-is-active' into integration 2026-03-16 16:27:59 -10:00
J. Nick Koston 0f4f5aa392 [esp32_ble, esp32_ble_server] Inline is_active/is_running and remove STL bloat from BLE server loop
Move ESP32BLE::is_active() and BLEServer::is_running() to headers
with ESPHOME_ALWAYS_INLINE to eliminate cross-TU call overhead on
every loop iteration. Replace std::remove_if + erase in
BLEServer::loop() with a simple index-based compacting loop,
removing ~250 bytes of unrolled STL template machinery.
2026-03-16 16:27:39 -10:00
J. Nick Koston 3d77e95b11 merge 2026-03-16 15:47:32 -10:00
J. Nick Koston cb336819be Merge branch 'dev' into esp32-sram1-as-iram 2026-03-16 15:47:08 -10:00
J. Nick Koston 2fcf38c53d [esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32
Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
2026-03-16 15:43:51 -10:00
J. Nick Koston eb34cf0142 Merge remote-tracking branch 'upstream/esp32-sram1-as-iram' into integration 2026-03-16 15:26:12 -10:00
J. Nick Koston bd3287a554 [esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32
Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
2026-03-16 15:24:12 -10:00
J. Nick Koston 03db9d7ada Merge remote-tracking branch 'upstream/esp32-sram1-as-iram' into integration 2026-03-16 15:16:58 -10:00
J. Nick Koston 6423f9832f [esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32
Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
2026-03-16 15:15:42 -10:00
Jesse Hills bba11b3b1e Merge branch 'beta' into dev 2026-03-17 14:14:03 +13:00
Jesse Hills a40d97f346 Merge pull request #14873 from esphome/bump-2026.3.0b3
2026.3.0b3
2026.3.0b3
2026-03-17 14:13:29 +13:00
J. Nick Koston 0a67cf4496 Merge remote-tracking branch 'upstream/esp32-sram1-as-iram' into integration 2026-03-16 15:12:57 -10:00
J. Nick Koston d7dc641fcb [esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32
Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
2026-03-16 15:12:32 -10:00
J. Nick Koston fe759e613e Merge remote-tracking branch 'upstream/esp32-sram1-as-iram' into integration 2026-03-16 14:56:49 -10:00
J. Nick Koston 9c81c0ab53 [esp32] Add sram1_as_iram option for +40KB IRAM on original ESP32
Add a new `sram1_as_iram` option under `esp32 > framework > advanced`
that enables CONFIG_ESP_SYSTEM_ESP32_SRAM1_REGION_AS_IRAM, reclaiming
40KB of SRAM1 memory as additional IRAM on the original ESP32.

This requires a bootloader from ESP-IDF v5.1 or later. USB flashing
updates the bootloader automatically, but OTA does not. At boot,
ESPHome now detects the bootloader version and suggests enabling
this option when the bootloader is compatible.
2026-03-16 14:54:20 -10:00
J. Nick Koston 8e8faaa983 Merge remote-tracking branch 'upstream-ssh/api-overflow-buffer-cleanup' into integration 2026-03-16 13:11:13 -10:00
J. Nick Koston 1ecbd28742 Address review: restore queue-full log, fix power-of-2 comment
- Add HELPER_LOG when overflow buffer is full and connection is dropped
- Clarify comment: defaults are power of 2 (not a requirement for users)
2026-03-16 13:09:41 -10:00
J. Nick Koston 61cc3022cb Address review: save errno before use, fix docs, add missing include
- Save errno into local before check_socket_write_err_ and HELPER_LOG
  to avoid potential clobbering between reads
- Update try_drain() doc: 0 means all-drained or no-progress (callers
  only act on -1)
- Include socket/headers.h explicitly for struct iovec
2026-03-16 13:08:08 -10:00
J. Nick Koston 69956c54a7 fix power of 2 2026-03-16 13:04:29 -10:00
J. Nick Koston 3ac6eb0f5a Address review: only log hard errors, fix try_drain doc comments
- Move HELPER_LOG after errno check so transient WOULD_BLOCK doesn't
  spam very-verbose logs during normal backpressure
- Fix try_drain() docstring: -1 can be EWOULDBLOCK or hard error
  (caller distinguishes via errno), 0 means no progress (not would-block)
2026-03-16 13:01:42 -10:00
J. Nick Koston 1450d1e487 Merge branch 'dev' into api-overflow-buffer-cleanup 2026-03-16 12:51:38 -10:00
Jesse Hills d6c67d5c35 Bump version to 2026.3.0b3 2026-03-17 11:45:03 +13:00
Jonathan Swoboda 0816b27398 [core] Support both dot and dash separators in Version.parse (#14858) 2026-03-17 11:45:03 +13:00
Jonathan Swoboda 9133582aa0 [as3935] Fix ENERGY_MASK dropping bit 4 of lightning energy MMSB (#14861) 2026-03-17 11:45:02 +13:00
Jonathan Swoboda f36b0fcb61 [am43] Fix battery update throttle using wrong type (#14864) 2026-03-17 11:45:02 +13:00
Jonathan Swoboda bb0a5dc8a8 [lilygo_t5_47] Fix Y coordinate mapping and clamp touch point count (#14865) 2026-03-17 11:45:02 +13:00
Jonathan Swoboda 0c260e483e [gpio][dallas_temp] Fix one_wire read64() and DS18S20 division by zero (#14866) 2026-03-17 11:45:02 +13:00
tomaszduda23 b8ce907976 [ble_nus] fix uart debug (#14850) 2026-03-17 11:45:02 +13:00
dependabot[bot] ffce637ea5 Bump aioesphomeapi from 44.5.1 to 44.5.2 (#14849)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 11:45:02 +13:00
d6fba39037 [runtime_image] Add esp-dsp dependency for JPEGDEC SIMD on ESP32 (#14840)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
2026-03-17 11:45:02 +13:00
J. Nick Koston 5d5c2723b2 [fastled] Include esp_lcd IDF component for ESP32-S3 compatibility (#14839) 2026-03-17 11:45:02 +13:00
guillempagesandJonathan Swoboda 06d1498c47 [runtime_image] Update jpegdec lib version (#14726)
Co-authored-by: Jonathan Swoboda <154711427+swoboda1337@users.noreply.github.com>
2026-03-17 11:45:02 +13:00
J. Nick Koston e2a68cc2d3 Simplify: return drain result directly in loop() 2026-03-16 12:44:33 -10:00
J. Nick Koston 9f774b3827 Inline empty() fast path, out-of-line drain+error handling
Keep the cheap overflow_buf_.empty() check inline at all call sites.
Move try_drain + HELPER_LOG + error handling into a single out-of-line
drain_overflow_and_handle_errors_() used by both write_raw_ and the
subclass loop() methods. Eliminates the duplicated drain logic.
2026-03-16 12:43:17 -10:00