mirror of
https://github.com/esphome/esphome.git
synced 2026-07-10 17:05:36 +00:00
a27f5127d8
Add a `force` proto field option that generates `_force` variants of calc_ and encode methods, skipping the zero/empty check. Applied to BluetoothLERawAdvertisement fields that are almost always non-default (address, rssi, data) to eliminate dead branches on the BLE proxy hot path. On-device benchmarks show calculate_size improved from 12,649 ns to 10,982 ns per 12-advertisement batch (-13.2%) with only +8 bytes flash. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>