-
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
[Perf] ReportScreen rendering optimisation #30063
[Perf] ReportScreen rendering optimisation #30063
Conversation
@@ -6,7 +6,7 @@ import ComposeProviders from './ComposeProviders'; | |||
// Set up any providers for individual keys. This should only be used in cases where many components will subscribe to | |||
// 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100% intentional? just asking :P
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, a valid syntax that looks like a poorly resolved conflict 😂 Thanks!
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.
just wanted to make sure, fine with me then :)
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.
❤️
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where there is a will there is a Stack Overflow! 🎉
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.
@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 |
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.
Wow, this is visibly faster, even without any measurements. On Android with HT account the difference is especially noticeable
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.
This is great!
✋ 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 Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
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