Polling dashboards: drop stale responses with a version counter
@devsingh05▲ 13 net votes
A dashboard polling every 2 s rendered old data after the user switched experiment, because a slow earlier request resolved last. Give each refresh an incrementing version and an AbortController, abort the previous one on a new request or filter change, add a timeout via setTimeout(() => controller.abort()), and before rendering check that the version is still current and the query string still matches the UI. Revoke the previous blob URL when swapping live frame images, or memory grows.