From 4adad7eb7ffecd21ec7d6a89786e954254722aa1 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 25 May 2026 06:25:12 +0000 Subject: [PATCH 1/2] perf(poller): Unroll `any()` generator in meshtastic telemetry parser Co-authored-by: d3mocide <136547209+d3mocide@users.noreply.github.com> --- poller/normalizers/meshtastic_mqtt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poller/normalizers/meshtastic_mqtt.py b/poller/normalizers/meshtastic_mqtt.py index 13d0ebc..14e9ee5 100644 --- a/poller/normalizers/meshtastic_mqtt.py +++ b/poller/normalizers/meshtastic_mqtt.py @@ -133,7 +133,8 @@ async def _handle_telemetry(data: dict, entity_id: str, sender_hex: str) -> None chan_util = device.get("channel_utilization") air_util = device.get("air_util_tx") - if not any(v is not None for v in (battery, voltage, chan_util, air_util)): + # ⚡ Bolt Optimization: Unroll any() generator to avoid frame and tuple creation overhead in telemetry processing loop + if battery is None and voltage is None and chan_util is None and air_util is None: return identity_update: dict = {"node_id": sender_hex} From 4b99a0a47ce21162f63614823b28b0c23c7113bf Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 26 May 2026 14:17:51 +0000 Subject: [PATCH 2/2] perf(poller): Unroll `any()` generator in meshtastic telemetry parser Co-authored-by: d3mocide <136547209+d3mocide@users.noreply.github.com> --- poller/normalizers/meshtastic_mqtt.py | 1 - 1 file changed, 1 deletion(-) diff --git a/poller/normalizers/meshtastic_mqtt.py b/poller/normalizers/meshtastic_mqtt.py index 14e9ee5..864843b 100644 --- a/poller/normalizers/meshtastic_mqtt.py +++ b/poller/normalizers/meshtastic_mqtt.py @@ -133,7 +133,6 @@ async def _handle_telemetry(data: dict, entity_id: str, sender_hex: str) -> None chan_util = device.get("channel_utilization") air_util = device.get("air_util_tx") - # ⚡ Bolt Optimization: Unroll any() generator to avoid frame and tuple creation overhead in telemetry processing loop if battery is None and voltage is None and chan_util is None and air_util is None: return