Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
5 tasks done
marcaaron opened this issue Sep 29, 2022 · 3 comments
Closed
5 tasks done

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

marcaaron opened this issue Sep 29, 2022 · 3 comments
Assignees
Labels
Daily KSv2 Engineering Reviewing Has a PR in review

Comments

@marcaaron
Copy link
Contributor

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] 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

@marcaaron marcaaron self-assigned this Sep 29, 2022
@marcaaron marcaaron added the Reviewing Has a PR in review label Sep 29, 2022
@parasharrajat
Copy link
Member

parasharrajat commented Sep 29, 2022

Much needed change. It will be helpful for Context menus as well.

Taking back. I misunderstood. 😄

@marcaaron
Copy link
Contributor Author

Oh that's a good point though. There might be some subscriptions like this in the context menu...

@marcaaron
Copy link
Contributor Author

Yep there's a subscription to betas here:

withOnyx({
betas: {
key: ONYXKEYS.BETAS,
},
}),

I bet we can improve that as well.

@melvin-bot melvin-bot bot closed this as completed Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Daily KSv2 Engineering Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests

2 participants