-
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: improve isOneOnOneChat and getParticipantsAccountIDsForDisplay #47300
perf: improve isOneOnOneChat and getParticipantsAccountIDsForDisplay #47300
Conversation
@ZhenjaHorbach 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] |
@gedu |
@ZhenjaHorbach yes please! 🙏 |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.movAndroid: mWeb Chromeandroid-web.moviOS: Nativeios.moviOS: mWeb Safariios-web.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@gedu |
@ZhenjaHorbach All checks passing now |
Cool, thank you ! |
We did not find an internal engineer to review this PR, trying to assign a random engineer to #47336 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
Nice job ! |
cc @mountiny should this also get assigned to someone internally now? |
Actually @Beamanator was assigned to this issue @Beamanator |
Hey @Beamanator, do you think you'll be able to jump into this review shortly or you're occupied? |
@gedu @adhorodyski can y'all please merge main & retest so we're sure there's no conflicts / bugs caused by recent PRs merged? |
@Beamanator merge done |
# Conflicts: # src/libs/ReportUtils.ts
Thanks for merging main! Did y'all retest as well to make sure everything works well? |
@Beamanator any news? |
Also retested |
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. |
Performance Comparison Report 📊Significant Changes To Duration
Show details
Meaningless Changes To DurationShow entries
Show details
|
@Expensify/mobile-deployers 📣 Please look into this performance regression as it's a deploy blocker. |
🚀 Deployed to staging by https://github.com/Beamanator in version: 9.0.25-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/Beamanator in version: 9.0.25-0 🚀
|
Taking a look at this |
That e2e issue is being discussed in two other threads |
@gedu any update about those convos? ^ |
@Beamanator they weren't introduce by this PR, there is an issue created for that |
Amazing, thanks for the response @gedu 🙏 👍 |
Details
This fix improve in
getParticipantsAccountIDsForDisplay
the redundant parsing of IDs to Number, avoiding doing it inside of the loop.It also improves the way to know if it is a 1:1 chat, avoiding looping through all the list and returning earlier if it isn't.
All this gives big improvements from ±0.2ms to ±0.003ms executing those functions.
Translated to
createOptionList
there is a ~100ms improvement, from 380ms to 280msFixed Issues
$ #47336
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop