Skip to content

[Performance] Remove withOnyx() subscription in ReportActionItem #11440

Description

@marcaaron

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


What performance issue do we need to solve?

inefficient React component rendering

What is the impact of this on end-users?

Slow to render chat. Takes more time to appear.

List any benchmarks that show the severity of the issue

Each ReportActionItem needs to retrieve data for the blockedFromConcierge key which can add significant overhead when rendering many comments in a chat.

Proposed solution (if any)

Like we did with the report action drafts we can use Context API for these subscriptions and it will have a slight impact on chat switching times.

List any benchmarks after implementing the changes to show impacts of the proposed solution (if any)

Before

Timing:expensify.cash.switch_report.cold 231
Timing:expensify.cash.switch_report.cold 223
Timing:expensify.cash.switch_report.cold 214

After

Timing:expensify.cash.switch_report.cold 171
Timing:expensify.cash.switch_report.cold 206
Timing:expensify.cash.switch_report.cold 191

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.2.9-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL:

View all open jobs on Upwork

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions