Repository navigation
Description
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?
Right now, every time a report action updates the whole <ReportActionsList /> will re-render. None of the items that get rendered are memoized. This means that on a single update (e.g. adding a reaction/editing the text) all mounted views of the list will need to re-render.
Lets investigate the ReportScreen component tree too as its quite render heavy
What is the impact of this on end-users?
Re-rendering components when its contents haven't changed will in general slow down the app for no good reason
List any benchmarks that show the severity of the issue
None yet
Proposed solution (if any)
- Memoize the - For this approach it would be good to have a version number for each report action, so we can quickly compare if we need to re-render it
- Only pass an array of string ids to , which represents the order of report actions. Then, just receives a string, and connects to onyx to get updates for the action from the store. This way when an update to a report happens (such as an added reaction), only the instance of has to re-render instead of the whole list
This approach might even be faster than the first option, as on an update not all items have to run their arePropsEqual function.
List any benchmarks after implementing the changes to show impacts of the proposed solution (if any)
None yet
Platforms:
Which of our officially supported platforms is this issue occurring on?
- Android / native
- Android / Chrome
- iOS / native
- iOS / Safari
- MacOS / Chrome / Safari
- MacOS / Desktop
Version Number: v1.2.71-1
Reproducible in staging?: yes
Reproducible in production?: yes
Email or phone of affected tester (no customers): N/A
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
Expensify/Expensify Issue URL: here
Issue reported by: @hannojg
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1675076963206029
Metadata
Metadata
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
hannojg commentedon Feb 15, 2023
Please assign me for this one 👼
MelvinBot commentedon Mar 10, 2023
This issue has not been updated in over 15 days. eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
99 remaining items
melvin-bot commentedon Oct 4, 2023
@janicduplessis, @hannojg, @mountiny Whoops! This issue is 2 days overdue. Let's get this updated quick!
melvin-bot commentedon Oct 4, 2023
Triggered auto assignment to @isabelastisser (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Oct 4, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)mountiny commentedon Oct 4, 2023
Hello @isabelastisser Can you please pay $500 to @sobitneupane for review and testing of this PR? Thanks!
sobitneupane commentedon Oct 9, 2023
#15163 (comment)
Requested payment on newDot
mountiny commentedon Oct 9, 2023
Thanks then we can close this one
JmillsExpensify commentedon Oct 9, 2023
$500 payment approved for @sobitneupane based on this comment.