-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Optimize notifications rendering #1957
Conversation
@@ -56,15 +56,15 @@ interface Author { | |||
moderation: ProfileModeration | |||
} | |||
|
|||
export function FeedItem({ | |||
let FeedItem = ({ |
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.
hi, i'm just stranger
but can you explain this approach, please? interesting
why you need to store component in let variable and apply memo later, instead of just wrapping component in memo?
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, i doesn't know that every stranger can comments on pr's like that
if i'm not allowed to, please excuse 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.
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 doesn't really matter, I just want to avoid an extra indentation level in the code.
To people getting excited by this PR — this just returns us to the baseline perf we had before a bunch of refactors. So this won't by itself make anything faster, it just avoids us making things slow :) |
Before
Scrolling notifications with 6x CPU throttling: 700ms stall.
After
Scrolling notifications with 6x CPU throttling: 30ms stall.