In hub mode, hub_loop re-broadcasts to dashboard clients on a hardcoded 0.5s (core/hub_handlers.py):
# Match node update rate for real-time responsiveness
await asyncio.sleep(0.5)
The hub is push-based. It already receives each node's data over a WebSocket in Hub._connect_node as the node emits it, so the 0.5s timer is independent of the node rate. When nodes update slower than 0.5s (a higher UPDATE_INTERVAL, or the 2s nvidia-smi path), the hub re-sends the same cached data several times per real update. Across multiple nodes that wastes CPU and traffic, and it doesn't match the node rate the comment intends.
Raised two PRs:
#69 supersedes #70 on the same line, so could skip. Though the interval knob could be used as an optional cap on broadcast rate, for when nodes push faster than you want to fan out.
In hub mode, hub_loop re-broadcasts to dashboard clients on a hardcoded 0.5s (core/hub_handlers.py):
The hub is push-based. It already receives each node's data over a WebSocket in
Hub._connect_nodeas the node emits it, so the 0.5s timer is independent of the node rate. When nodes update slower than 0.5s (a higherUPDATE_INTERVAL, or the 2s nvidia-smi path), the hub re-sends the same cached data several times per real update. Across multiple nodes that wastes CPU and traffic, and it doesn't match the node rate the comment intends.Raised two PRs:
config.UPDATE_INTERVALinstead of the hardcoded 0.5s. Default stays 0.5s.#69 supersedes #70 on the same line, so could skip. Though the interval knob could be used as an optional cap on broadcast rate, for when nodes push faster than you want to fan out.