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 Source renderer scroll performance [DRAFT] #9587
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
8a27825
to
3f7b065
Compare
Couple of Delta tests failed. Probably helper methods need to be updated to account for markup changes. I'll pick those up Monday morning. I think this is ready to be reviewed, otherwise. |
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.
No real feedback :) You've obviously put a lot of thought into this, and as usual the changes make sense at first glance based on the description.
Thanks Mark! |
Final check list:
How did the React components change?
ReactElements
(and DOM nodes) are being created per row.itemData
since "hot" actions (like scroll position, cursor position) were frequently invalidating the memoized values anyway.SourceList
.How has the DOM changed?
The React components have changed a lot (hopefully in a way that simplifies them and makes them more performant) but the underlying DOM also changes (to become flatter) with this PR. Hopefully this simplifies positioning and helps the browser render/layout a bit faster. Here's a before/after for a single row (the same row)
HTML before
HTML after
Is the new Source viewer faster?
I think so, although it's difficult to measure this sort of stuff.
Scrolling before
Rough average scroll handler duration ~12ms maybe?
Scrolling after
Rough average scroll handler duration ~5ms maybe?