A responsive robotics or smart-glasses companion needs an explicit latency budget across capture, transport, inference, state processing, and rendering. Optimizing only Flutter widgets will not fix a slow end-to-end pipeline.
Define the user-visible deadline
Choose a target based on the interaction. Telemetry can tolerate more delay than teleoperation feedback. Track capture-to-display age separately from network round-trip time.
Assign a budget to every stage
Record timestamps at the producer, gateway, inference service, Flutter receipt, state reducer, and render scheduling boundary. Use monotonic clocks for durations within one process; account for clock offset across hosts.
Measure percentiles, not only averages
Capture p50, p95, and p99 latency, queue depth, dropped frames, and stale-result rate. A healthy average can hide stalls operators notice.
Keep the Flutter path lean
Validate and parse messages before they reach widget build methods.…