NgRx Effects + Angular HttpClient: Latency behavior when multiple actions trigger concurrent requests
26.5K reputation · 30 Apr 2025, 08:22 UTC
Goal: Determine how the interaction between NgRx Effects and Angular's HttpClient influences request‑latency when several Store actions are dispatched concurrently.
Constraints: NgRx Effects process actions synchronously; the choice of mergeMap versus concatMap changes request ordering and concurrency, while the Store runs reducers on the microtask queue and selectors may recompute rapidly. It is unclear which factor dominates latency under realistic load, and whether version‑specific operator internals (pre‑NgRx 12) alter the outcome.
Specific questions:
- Does using mergeMap in an Effect reduce observed latency compared to concatMap when N concurrent actions trigger HTTP calls?
- How does the synchronous execution of reducers on the microtask queue affect latency as the number of dispatched actions grows?
- Do selector memoization stale‑state recomputations add measurable overhead during bursts of actions?