[Perf] ReportScreen rendering optimisation#30063
Conversation
| // the same key (e.g. FlatList renderItem components) | ||
| const [withNetwork, NetworkProvider, NetworkContext] = createOnyxContext(ONYXKEYS.NETWORK); | ||
| const [withPersonalDetails, PersonalDetailsProvider] = createOnyxContext(ONYXKEYS.PERSONAL_DETAILS_LIST); | ||
| const [withPersonalDetails, PersonalDetailsProvider, , usePersonalDetails] = createOnyxContext(ONYXKEYS.PERSONAL_DETAILS_LIST); |
There was a problem hiding this comment.
100% intentional? just asking :P
There was a problem hiding this comment.
Haha, good catch! ^^ Edu asked the same here.
tl;dr; It is intentional as the context value is no needed and eslint did not allow _ as a placeholder - so we stick to this - perfectly valid, although quirky syntax :D
There was a problem hiding this comment.
yeah, a valid syntax that looks like a poorly resolved conflict 😂 Thanks!
There was a problem hiding this comment.
just wanted to make sure, fine with me then :)
There was a problem hiding this comment.
TIL
FWIW I think it might be more obvious to use the eslint disable. This looks really weird to me 😄
There was a problem hiding this comment.
Yup the syntax is quite peculiar :D Wonder if there is an option in eslint to let us use _ as a placeholder (if I am not mistaken such syntax is used for example in Python).
I am not really a big fan of adding eslint disable comments ^^
There was a problem hiding this comment.
Where there is a will there is a Stack Overflow! 🎉
There was a problem hiding this comment.
|
@eVoloshchak 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] |
|
@kacper-mikolajczak, could you merge the latest main? |
|
@eVoloshchak done 👍 |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-10-23.at.18.32.05.movMobile Web - Chromescreen-20231023-182902.mp4Mobile Web - SafariScreen.Recording.2023-10-23.at.18.30.25.movDesktopScreen.Recording.2023-10-23.at.18.33.47.moviOSScreen.Recording.2023-10-23.at.18.25.12.movAndroidscreen-20231023-182417.mp4 |
eVoloshchak
left a comment
There was a problem hiding this comment.
Wow, this is visibly faster, even without any measurements. On Android with HT account the difference is especially noticeable
|
✋ 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/thienlnam in version: 1.3.90-0 🚀
|
|
Good to hear that guys, thanks! |
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.90-2 🚀
|
|
🚀 Deployed to staging by https://github.com/thienlnam in version: 1.3.91-0 🚀
|
|
🚀 Deployed to production by https://github.com/marcaaron in version: 1.3.91-8 🚀
|
Details
Fixed Issues
$ #29987
PROPOSAL: #29987
Tests
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)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
android.mp4
Android: mWeb Chrome
mandroid.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
mios.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4