You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-06-23] Stabilize report subscriptions in the ReportActionItem tree #93434
ReportActionItem re-render stability regressed again on main. report-shaped useOnyx subscriptions in the ReportActionItem tree hand back new references with deep-equal content on nearly every render, causing wasted re-renders on the report screen (visible during message send).
Root causes:
A shared module-level getStableReportSelector makes every consumer on the same report key share one Onyx cache slot, churning references.
iouReport / chatReport subscribe to the full report, so they re-render on every last* heartbeat field (which change on every message send).
originalReport is subscribed in ReportActionItem rather than in its only consumer.
changed the title [-]Stabilize report subscriptions in the ReportActionItem tree[/-][+][Due for payment 2026-06-23] Stabilize report subscriptions in the ReportActionItem tree[/+]on Jun 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.8-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Made them more realistic by using data based on useOnyx + small clean up
Added another test that mocks 10 ADD_COMMENT actions with changes to the report's last* fields.
I checked the results, and without the fix from this merged PR, the render times are about 50% worse
@LukasMod thanks for digging into this. Yes, this is the right direction.
Good catch on the render times showing 0. I checked the history and this is not an intentional change. It comes from the Jest 29 upgrade back in 2023, where we enabled modern fake timers globally. The modern fake timers also fake performance, and React's Scheduler reads performance once at load, so every render duration became 0. So the perf tests were silently not measuring renders for a long time. Fixing the measurement first makes sense. Otherwise any new regression test we add would not catch anything.
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: N/A. Not a bug.
Link to the comment on the Issue: N/A.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Not needed since this is a performance optimisation task and no UI changes.
Activity
LukasMod commentedon Jun 15, 2026
@cristipaval
I worked today on performance tests to guard for this situation in the future.
I noticed that currently (locally and on CI) reassure performance tests always shows 0 for renders:
I managed to fix it with this small config change:
Config PR: #93573
I applied it only to perf files because it breaks standard unit tests that use
jest.advanceTimersByTime().After that, I prepared some improvements to the ReportActionsList performance tests:
I checked the results, and without the fix from this merged PR, the render times are about 50% worse
melvin-bot commentedon Jun 15, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
LukasMod commentedon Jun 16, 2026
Already confirmed it's not related to this PR: #93641 (comment)
[-]Stabilize report subscriptions in the ReportActionItem tree[/-][+][Due for payment 2026-06-23] Stabilize report subscriptions in the ReportActionItem tree[/+]1 remaining item
melvin-bot commentedon Jun 16, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.8-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-06-23. 🎊
For reference, here are some details about the assignees on this issue:
cristipaval commentedon Jun 17, 2026
@LukasMod thanks for digging into this. Yes, this is the right direction.
Good catch on the render times showing 0. I checked the history and this is not an intentional change. It comes from the Jest 29 upgrade back in 2023, where we enabled modern fake timers globally. The modern fake timers also fake performance, and React's Scheduler reads performance once at load, so every render duration became 0. So the perf tests were silently not measuring renders for a long time. Fixing the measurement first makes sense. Otherwise any new regression test we add would not catch anything.
melvin-bot commentedon Jun 19, 2026
@QichenZhu Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Jun 22, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jun 22, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
QichenZhu commentedon Jun 22, 2026
BugZero Checklist:
[Contributor] The offending PR and associated issue have been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to the comment on the PR: N/A. Not a bug.
Link to the comment on the Issue: N/A.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion: N/A.
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Not needed since this is a performance optimisation task and no UI changes.
mallenexpensify commentedon Jun 25, 2026
Payment Summary
Contributor+: @QichenZhu due $250 via NewDot
trjExpensify commentedon Jul 1, 2026
approved $250 for @QichenZhu