Fix rendering TransactionListItemRow#42986
Conversation
|
@allroundexperts Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Kicu
left a comment
There was a problem hiding this comment.
Looks good 👍 and makes sense to me. I agree with @jnowakow that if we want Live updates to work then the components have to react to any prop changing, as a change of any prop can now come at anytime.
Also when I actually tested how often the TransactionItem re-renders I noticed that they do NOT render on every scroll. There is quite a lot of re-renderes when new data is fetched via lazy loading - but that is expected.
To me removing memo for now makes sense. I don't think it makes that big of a difference
luacmartins
left a comment
There was a problem hiding this comment.
Won't remove memo and keyForList re-introduce the performance issue we had with Search on native devices?
|
if |
I don't think it will as the I would go forward with this PR as it blocks the Onyx one. In the meantime I can check what causes the performance problems on Android |
|
Ah that makes sense! Thanks for clarifying. I agree this is not a blocker then. |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
|
🚀 Deployed to production by https://github.com/Julesssss in version: 1.4.79-11 🚀
|
|
@jnowakow @luacmartins Did you test with hundreds of row or any stress test? |
|
I tried it with ~200 rows |
Details
Recent PR wrapped all components used in
TransactionListItemRowinmemo. As onlykeyForListwas used inarePropsEqualit prevented those rows to update when transaction changed. It seems thatmemoisn't required at all in this case as those components aren't re-rendered frequently even during scroll.Fixed Issues
$ #42774
PROPOSAL: N/A
Tests
Offline tests
N/A
QA Steps
Same as in Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
search-android.mov
Android: mWeb Chrome
See comment
iOS: Native
search-ios.mov
iOS: mWeb Safari
search-ios-web.mov
MacOS: Chrome / Safari
search-web.mov
MacOS: Desktop
search-desktop.mov