-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Improve performance of Search list #45165
Improve performance of Search list #45165
Conversation
@ahmedGaber93 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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. @ahmedGaber93 are you able to check if this impacts the performance for you?
@luacmartins Yes checking |
The performance slightly improved, but I still see blank space when fast scroll specially in the first render ios native20240710223611362.mp4android web20240710224606554.mp4web20240710223403835.mp4 |
@luacmartins I still see blank space when fast scroll for the first render. videos above ☝️ |
I think that's fine for now. I'll take the small performance improvement while we still investigate other solutions. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativea.mp4Android: mWeb Chromeaw.mp4iOS: Nativei.mp4iOS: mWeb Safariiw.mp4MacOS: Chrome / Safariw.mp4MacOS: Desktopdesktop.mp4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.7-3 🚀
|
🚀 Cherry-picked to staging by https://github.com/thienlnam in version: 9.0.7-4 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.7-8 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.0.8-6 🚀
|
Details
getItemHeight
function will lead to better list performanceBaseSelectionList
and in turn callsgetItemHeight
results
To me results are inconclusive. I used React Profiler to profile rendering of list, then scrolling and lazy loading new items. When using the code with
_.memoize
rendering of whole List seems to be faster by around 2-3ms which is not a lot 🤷I think a better test is for a few people build this and just get a feel for whether it looks good or bad.
NOTE:
Search
component is not re-rendering a lot - only once when new list items are fetched, so I believe we should not be putting any improvements or memoization toSearch
component itself.CC @luacmartins
Fixed Issues
$ #43396
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
rec-and-searchlist.mp4
Android: mWeb Chrome
iOS: Native
rec-ios-searchlist.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop