Skip to content

[Feature]: Surface reducer execution time in performance panel #42

@omoladeodetara

Description

@omoladeodetara

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions