Files
esphome/esphome
J. Nick KostonandClaude Opus 4.6 665b0143f9 [esp32_ble] Optimize BLE event hot path performance
- LockFreeQueue: Add fast-path check to get_and_reset_dropped_count().
  On Xtensa, uint16_t atomic exchange compiles to ~25 instructions with
  a CAS retry loop and memory barriers. A relaxed load (single instruction)
  short-circuits the common case where dropped_count is zero.

- BLEEvent: Remove redundant release() calls in load_*_event() methods.
  EventPool::release() already calls event->release() before returning
  events to the free list, so every event from allocate() is already clean.

- BLEEvent::release(): Only null heap_data on the delete path. Skip
  unconditional zeroing of is_inline and heap_data when data was inline
  (no heap allocation to clean up).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 09:24:10 -10:00
..