Skip to content

v2.1.2 — Broadcast path off the event loop

Latest

Choose a tag to compare

@sytchi sytchi released this 29 Jul 12:57

⚠️ Upgrading from 1.x? 2.0.0 removed the 1:1 camera.*_map and the pixel clean_zone contract. Repoint to camera.*_map_hd with camera calibration.

Performance only. No configuration, entity or service changes.

Changed

  • Broadcast decoding no longer uses blackboxprotobuf. A purpose-built wire-format decoder is 7.1x faster and bit-for-bit compatible; payloads it cannot reproduce fall back to the library.
  • Duplicate broadcasts are skipped before decoding. While docked, ~84% of frames are byte-identical repeats.
  • The WebSocket listener yields between frames, so several buffered frames no longer land in one blocking event-loop step.

Impact

Event-loop time blocked by the listener, measured on a live Home Assistant host (x86_64, CPython 3.14):

before after
docked 11.44 ms/s 0.11 ms/s
cleaning 7.0 ms/s (0.7% of wall time)

Verified against blackboxprotobuf on 325 captured payloads and 40 000 generated ones, plus 801 real frames replayed through the old and new paths with identical resulting state.

Full details in the CHANGELOG.