perf(virtualized-lists) removing rerender cells for every change of Virtualized list#46103
Closed
Tom910 wants to merge 1 commit into
Closed
perf(virtualized-lists) removing rerender cells for every change of Virtualized list#46103Tom910 wants to merge 1 commit into
Tom910 wants to merge 1 commit into
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D61493434 |
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D61493434 |
8b965bf to
f39f985
Compare
…irtualized list (facebook#46103) Summary: Pull Request resolved: facebook#46103 Reducing the boundary of rerender of virtual lists. Previously with prop: "strictMode={true}" the VirtualizedList still re rendered each CellRenderer component. Because method getDerivedStateFromProps generated every time a new uniq state and the cells didn’t have a PureComponent. It helps to improve react performance for lists which have 5+ elements. I reused recomended approach from react doc https://legacy.reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#what-about-memoization Reviewed By: NickGerleman, sammy-SC Differential Revision: D61493434
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D61493434 |
f39f985 to
2badfdd
Compare
Contributor
|
This pull request has been merged in 954e294. |
Collaborator
|
This pull request was successfully merged by @Tom910 in 954e294 When will my fix make it into a release? | How to file a pick request? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Reducing the boundary of rerender of virtual lists. Previously with prop: "strictMode={true}" the VirtualizedList still re rendered each CellRenderer component. Because method getDerivedStateFromProps generated every time a new uniq state and the cells didn’t have a PureComponent. It helps to improve react performance for lists which have 5+ elements.
I reused recomended approach from react doc https://legacy.reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html#what-about-memoization
Differential Revision: D61493434