-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[HOLD for payment 2024-12-25] [Performance] useOnyx doesn't return new data if the selector changes but the data in the store is the same #52597
Comments
Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext. |
@mountiny can you make this issue internal? @fabioh8010 and I are working on it |
You tagged the wrong person @pac-guerreiro , it's @mountiny 😄 |
Ups, sorry! 😅 |
Sounds good |
Last friday I didn't work on this but tomorrow I'll open a draft PR with a possible solution |
I opened a draft PR with a possible solution for this issue - Expensify/react-native-onyx#599 If you all agree, I can also create an eslint rule to enforce the usage of the dependency array when developers pass variables in |
I'm waiting on @fabioh8010 feedback on this since he has an alternate solution |
We are currently discussing the issue internally. |
Today @fabioh8010 and I discussed this issue internally. There are some ideas on the table on how to tackle this issue, so we'll continue discussing them tomorrow! |
Today @fabioh8010 continued our discussion, we are still trying to find a proper solution for this issue. |
Today I tried more possible solutions and discussed them with @fabioh8010. I've been having problems with infinite loops on getSnapshot. On Monday I'm going to discuss an alternative idea of @fabioh8010 for this performance issue. |
@fabioh8010, @mountiny, @pac-guerreiro Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Yesterday I was able to provide a possible solution to the problem and created a draft PR - Expensify/react-native-onyx#601 @fabioh8010 provided a solution of his, which I didn't have the time to check yesterday but today I'll do it! |
Today I reviewed @fabioh8010 solution and we discussed it. We need to confirm which one is the best and how we should proceed next |
Taking this issue over Pedro since he's going to be OOO until December 12th |
@fabioh8010, @mountiny, @pac-guerreiro Eep! 4 days overdue now. Issues have feelings too... |
Update: We agreed to test my solution against E/App and if everything is ok, we will proceed with it. |
@fabioh8010, @mountiny, @pac-guerreiro 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
Created a WIP Draft PR, testing the solution against E/App. |
Will open the Bump PR today |
Bump PR created -> #53890 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.76-12 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 2024-12-25. 🎊 For reference, here are some details about the assignees on this issue:
|
Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO. |
Triggered auto assignment to @sonialiap ( |
|
Auto-assign attempt failed, all eligible assignees are OOO. |
$250 to @sobitneupane No need for regression testing on this one |
Payment summary:
|
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 when onyx collection data is updated, although we're only accessing unmodified entries of the onyx collection.
Example case: #49919 (review)
What is the impact of this on end-users?
App performance can degrade with the inefficient rendering
List any benchmarks that show the severity of the issue
N/A
Proposed solution (if any)
Mimic dependency array from some React hooks, like
useEffect
, to forceuseOnyx
to fetch data if any dependency changes.Something like
useOnyx(key, options, [dependencyA])
.List any benchmarks after implementing the changes to show impacts of the proposed solution (if any)
N/A
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: v9.0.62-4
Reproducible in staging?: yes
Reproducible in production?: yes
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: #49919 (review)
Expensify/Expensify Issue URL:
Issue reported by:
Slack conversation:
View all open jobs on Upwork
Issue Owner
Current Issue Owner: @sonialiapThe text was updated successfully, but these errors were encountered: