-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[HOLD discussion] Add section for Proposing Performance Improvements #78757
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
base: main
Are you sure you want to change the base?
Conversation
|
@Krishna2323 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] |
contributingGuides/PERFORMANCE.md
Outdated
| *To ensure proposals are measurable and based on realistic scenarios, you must meet the following criteria:* | ||
| - [ ] **Experience:** I have at least **1 merged PR** in the App repository. | ||
| - [ ] **Test Environment:** I tested on a high-traffic account (instructions to create this [here](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#high-traffic-accounts)). |
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.
Still deciding if we should go with a high traffic account, OR link to some cleaned onyx state for download
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.
I think having a real online account is better so it is closer to real-life user experience, however, I think we might need a bit more complex account than the high-traffic account. It does not have any transactions/ approvers etc as far as I know. Maybe we could beef it up with some script?
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.
I agree with both things Vit said.
We also want to be careful that this demo account doesn't become outdated as we release more and more functionality. Just something to keep in mind, don't need to solve it right now.
| ### Review Process | ||
| 1. **Peer Review:** Wait for **2 Expert Contributors** to approve your proposal. | ||
| 2. **Internal Review:** Once approved by experts, tag `@Expensify/performance-reviewers`. |
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.
Since we're discussing in slack, we might create a new slack group instead - no GH group needed now right?
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, I think that sounds right. I don't think the external people can tag internal people. We could do the same as with the onyx-experts tag though so everyone in the group sets this tag into notification settings in Slack
contributingGuides/PERFORMANCE.md
Outdated
| *To ensure proposals are measurable and based on realistic scenarios, you must meet the following criteria:* | ||
| - [ ] **Experience:** I have at least **1 merged PR** in the App repository. | ||
| - [ ] **Test Environment:** I tested on a high-traffic account (instructions to create this [here](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#high-traffic-accounts)). |
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.
I think having a real online account is better so it is closer to real-life user experience, however, I think we might need a bit more complex account than the high-traffic account. It does not have any transactions/ approvers etc as far as I know. Maybe we could beef it up with some script?
contributingGuides/PERFORMANCE.md
Outdated
| - [ ] **Thresholds:** My proposal meets **at least one** of the following: | ||
| - [ ] > 20% reduction in Render Count | ||
| - [ ] > 20% reduction in Execution Time | ||
| - [ ] > 100ms reduction in Perceived Latency |
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.
I thought we agreed that with the execution time, it should be a percentage AND a minimum absolute value. Because we want to avoid someone improving something that takes 50ms. This way, they would improve it to 39ms, which would be valid. Eventually we should focus on these too, but right now, I think we should try to make sure the proposals aim for bigger performance improvements
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.
Hmm am I misunderstanding the convo in this thread?
I feel like I see "OR" a lot but maybe I'm not quite understanding what you're recommending?
| ### Review Process | ||
| 1. **Peer Review:** Wait for **2 Expert Contributors** to approve your proposal. | ||
| 2. **Internal Review:** Once approved by experts, tag `@Expensify/performance-reviewers`. |
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, I think that sounds right. I don't think the external people can tag internal people. We could do the same as with the onyx-experts tag though so everyone in the group sets this tag into notification settings in Slack
contributingGuides/PERFORMANCE.md
Outdated
| ## 1. Prerequisites & Eligibility | ||
| *To ensure proposals are measurable and based on realistic scenarios, you must meet the following criteria:* | ||
| - [ ] **Experience:** I have at least **1 merged PR** in the App repository. |
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 kind of awkward because it doesn't meet either of "measurable and based on realistic scenarios". I suggest removing this item. There are so few people that this would be their first PR, and it's such a low bar, that I don't think it is worth having this.
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.
That's totally fair - the most recent convo for this point was here, where it seems people didn't have a problem with 1 merged PR so I might leave this comment around while resolving the others to see if anyone agrees / disagrees - I'm definitely happy to remove this for now though!
contributingGuides/PERFORMANCE.md
Outdated
| *To ensure proposals are measurable and based on realistic scenarios, you must meet the following criteria:* | ||
| - [ ] **Experience:** I have at least **1 merged PR** in the App repository. | ||
| - [ ] **Test Environment:** I tested on a high-traffic account (instructions to create this [here](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#high-traffic-accounts)). |
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.
I agree with both things Vit said.
We also want to be careful that this demo account doesn't become outdated as we release more and more functionality. Just something to keep in mind, don't need to solve it right now.
contributingGuides/PERFORMANCE.md
Outdated
| - [ ] **Experience:** I have at least **1 merged PR** in the App repository. | ||
| - [ ] **Test Environment:** I tested on a high-traffic account (instructions to create this [here](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#high-traffic-accounts)). | ||
| - [ ] **Thresholds:** My proposal meets **at least one** of the following: |
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 part feels more like it should exist after "required tools" and before "before/after metrics"
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.
Will move this lower! 👍
| * **Evidence:** *(Attach screenshots of the profiler or logs for both Before and After below this section)* | ||
| ## 5. Pattern Detection & Prevention | ||
| *Can we prevent this from happening again?* |
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.
What is "this" referring to? I don't quite understand the question.
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.
It's referring to the previous state of "worse performance" - this is supposed to be generic so it can apply to all proposals, but maybe it's too unclear & therefore won't get any useful response 😅
| ## 5. Pattern Detection & Prevention | ||
| *Can we prevent this from happening again?* | ||
| - [ ] **ESLint Rule:** I have proposed a rule to prevent this anti-pattern. |
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 making an assumption that it's caused by an anti-pattern, which I don't think is a safe assumption. We also believe in not pre-optimizing things, so it could just be a matter of something we find that we now would like to optimize. That is different than the performance problem being caused by an anti-pattern.
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.
I think the idea here is that whatever is causing the performance overhead head that the proposal addresses could be used in the App in other places - we would like to encourage the developer to identify it as a pattern and fix it everywhere, not just in one instance (or post N proposals with the same optimisation in bunch of places).
I agree we don't want to pre-optimize, but at the same time we should encourage the contributors to fix issues holistically and this section should aim for that. That is just for context
| --- | ||
| ### Compensation |
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 part would be weird to have in the template... is this where the template ends?
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.
Yes exactly, they def wouldn't want to copy / paste this in their proposal. This will be more clear when i put everything into a block
Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
Co-authored-by: Tim Golen <tgolen@gmail.com> Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com>
…ify/App into beaman-addPerformanceProposalPlan
Explanation of Change
Creates template for contributors to propose performance improvements in our App product
Fixed Issues
$ #66161
Tests
None needed, this just adds documentation
Offline tests
N/A
QA Steps
N/A
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari