Skip to content

[Perf] Compute transaction violations once in MoneyRequestReportPreviewProvider and share via context #96003

Description

@cristipaval

Problem

The report preview action buttons need transaction violations to decide what to show.
Right now this is computed more than once instead of one shared place. Computing
violations is not free, so doing it per-button adds extra work on each re-render.

Goal

  • Compute the transaction violations one time in MoneyRequestReportPreviewProvider.
  • Share the result through a context slice.
  • Update the action buttons to read violations from context instead of computing
    them on their own.
  • Measure the performance gain first, and add the numbers to the PR so we can
    confirm the change is worth it.

Related

Issue OwnerCurrent Issue Owner: @linhvovan29546

Metadata

Metadata

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions