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-07-02] [No QA] Reorder unread indicator predicates to short-circuit cheaply #94447
getUnreadReportsForUnreadIndicator runs on every Onyx update (report, report-action, NVP, draft) and previously walked every report computing six locals up front — including the expensive getOneTransactionThreadReportID call — before running the cheapest guards. On accounts with 100k reports this took ~1.1s per invocation.
Solution
Reordered the predicates to short-circuit as early as possible with no behavioral change: mute and hidden-for-current-user checks run first, isUnread runs third, and getOneTransactionThreadReportID plus report-action/NVP lookups are deferred behind those rejections. The heaviest predicate (shouldReportBeInOptionList) runs last, only for reports that are unread, non-muted, and non-hidden. This reduces runtime from ~1.1s to ~400ms on 100k-report accounts.
changed the title [-][No QA] Reorder unread indicator predicates to short-circuit cheaply[/-][+][Due for payment 2026-07-02] [No QA] Reorder unread indicator predicates to short-circuit cheaply[/+]on Jun 25, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.19-5 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
[-][No QA] Reorder unread indicator predicates to short-circuit cheaply[/-][+][Due for payment 2026-07-02] [No QA] Reorder unread indicator predicates to short-circuit cheaply[/+]melvin-bot commentedon Jun 25, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 25, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.19-5 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-07-02. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 30, 2026
@ZhenjaHorbach Eep! 4 days overdue now. Issues have feelings too...
melvin-bot commentedon Jul 1, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jul 1, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Jul 3, 2026
Payment Summary
Contributor+: @ZhenjaHorbach due $250 via NewDot
@ZhenjaHorbach plz complete the BZ checklist and tag me in a post once you have. Thx
ZhenjaHorbach commentedon Jul 4, 2026
It's a performance issue
So I think we don't need a checklist here
garrettmknight commentedon Jul 6, 2026
$250 approved for @ZhenjaHorbach