Skip to content

ScrollView performs 10x slower if nodes are added. #121

Answered by sammy-SC
psionic12 asked this question in Q&A
Discussion options

You must be logged in to vote

@psionic12 this is a great analysis, thank you! Btw, we just analysed performance of the New Architecture and published the findings #123. I think some of it may be relevant to what you observed here, especially the missing NDEBUG compiler flag, which makes layout considerably slower.

GNodelayoutImpl get called 10 times more than normal (50 times vs 500 times in my case)

This is expected. In Fabric, when ScrollView scrolls, it needs to update its content offset. This triggers Fabric's state update, not to be confused with React's useState hook. Fabric's state update triggers layout pass. In ScrollView's case it should be mostly just getting cached values. State of user interface is repr…

Replies: 4 comments 2 replies

Comment options

psionic12
Mar 22, 2023
Collaborator Author

You must be logged in to vote
0 replies
Comment options

psionic12
Mar 23, 2023
Collaborator Author

You must be logged in to vote
0 replies
Comment options

psionic12
Mar 23, 2023
Collaborator Author

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@psionic12
Comment options

psionic12 Apr 5, 2023
Collaborator Author

@sammy-SC
Comment options

Answer selected by cortinico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants