Problem Statement
The meta-reducer already measures reducer execution time via performanceTracker.measureRenderTime(), but the value is passed into a callback and then discarded it is never included in the STATE_CHANGE WebSocket message and never shown in the performance panel.
The performance panel currently only shows Angular render time (via afterNextRender), so users cannot distinguish between a slow reducer and slow change detection/DOM rendering.
Proposed Solution
Include reducer execution time in the STATE_CHANGE message and display it alongside render time in the performance panel.
Changes required:
meta-reducer.ts: capture the reducer duration and add it to StateChangeMessage as reducerTime?: number
core.models.ts: add reducerTime?: number to the StateChangeMessage interface
performance-panel.component.ts: read reducerTime from incoming messages and include it in RenderEntry
performance-panel.component.html: add a Reducer Time column to the slowest renders table; update the summary cards
Alternatives Considered
Measuring reducer time in the UI by diffing timestamps not accurate enough given network/serialization latency.
Component
Performance Panel (ngrx-devtool-ui) + Core Library (ngrx-devtool)
Problem Statement
The meta-reducer already measures reducer execution time via
performanceTracker.measureRenderTime(), but the value is passed into a callback and then discarded it is never included in theSTATE_CHANGEWebSocket message and never shown in the performance panel.The performance panel currently only shows Angular render time (via
afterNextRender), so users cannot distinguish between a slow reducer and slow change detection/DOM rendering.Proposed Solution
Include reducer execution time in the
STATE_CHANGEmessage and display it alongside render time in the performance panel.Changes required:
meta-reducer.ts: capture the reducer duration and add it toStateChangeMessageasreducerTime?: numbercore.models.ts: addreducerTime?: numberto theStateChangeMessageinterfaceperformance-panel.component.ts: readreducerTimefrom incoming messages and include it inRenderEntryperformance-panel.component.html: add a Reducer Time column to the slowest renders table; update the summary cardsAlternatives Considered
Measuring reducer time in the UI by diffing timestamps not accurate enough given network/serialization latency.
Component
Performance Panel (
ngrx-devtool-ui) + Core Library (ngrx-devtool)