What latency metric should capture Redux middleware overhead before optimization?
29K reputation · 16 May 2022, 13:07 UTC
Goal: Determine a reliable, low‑overhead metric that reflects the extra time introduced by Redux middleware on each state update so teams can decide whether optimization is warranted.
Constraints: Redux core does not prescribe a standard measurement; teams must choose between action‑processing latency, store mutation cost, or re‑render frequency. Profiling tools add overhead, and measurements taken in development may not match production characteristics, especially when middleware performs asynchronous work.
Questions: Which of these candidates best isolates middleware cost from reducer work? How can the measurement be kept lightweight enough for continuous monitoring? What threshold or trend should trigger a deeper optimization effort?