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 2025-07-30] [Due for payment 2025-07-22] Improve Onyx.set performance with optional flags for derived values #65715
Background
Our app uses a derived value system where values are computed from entire collections. Even when the computation itself is fast (often <5ms), we spend significantly more time (hundreds of milliseconds) inside Onyx internals when writing these large derived values to storage.
Problem
Onyx.set isn’t optimized for large objects like derived values. It performs a deep equality check against the cached value and recursively removes nulls, both of which become performance bottlenecks as object size grows.
Solution
Add an options parameter to Onyx.set with two flags:
skipCacheCheck: skips the deep equality check
skipNullRemoval: skips pruning null values
For derived values, we fully control their lifecycle and recompute them when any dependency changes - so we know the value is new and don’t need a deep comparison. Also, null may be a legitimate result of the computation, so pruning it is unnecessary. Skipping these two checks significantly improves performance when working with large objects.
Comparison made on a derived value we should have merged soon in this PR: #65247
Before: 165ms
After: <5ms
Issue is ready for payment but no BZ is assigned. @VictoriaExpensify you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
changed the title [-][Due for payment 2025-07-22] Improve Onyx.set performance with optional flags for derived values[/-][+][Due for payment 2025-07-30] [Due for payment 2025-07-22] Improve Onyx.set performance with optional flags for derived values[/+]on Jul 23, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.84-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
Activity
TMisiukiewicz commentedon Jul 9, 2025
cc @mountiny
18 remaining items
melvin-bot commentedon Jul 22, 2025
Issue is ready for payment but no BZ is assigned. @VictoriaExpensify you are the lucky winner! Please verify the payment summary looks correct and complete the checklist. Thanks!
melvin-bot commentedon Jul 22, 2025
Payment Summary
Upwork Job
BugZero Checklist (@VictoriaExpensify)
[-][Due for payment 2025-07-22] Improve Onyx.set performance with optional flags for derived values[/-][+][Due for payment 2025-07-30] [Due for payment 2025-07-22] Improve Onyx.set performance with optional flags for derived values[/+]melvin-bot commentedon Jul 23, 2025
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jul 23, 2025
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.84-4 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 2025-07-30. 🎊
For reference, here are some details about the assignees on this issue:
VictoriaExpensify commentedon Aug 1, 2025
Payment summary:
C: @parasharrajat owed $250 via NewDot
C+: @TMisiukiewicz - contractor, no payment due
parasharrajat commentedon Sep 3, 2025
Payment requested as per #65715 (comment)
quinthar commentedon Sep 15, 2025
Approved $250 to @parasharrajat