Skip to content
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

Enable virtualization for the block list on iOS #53265

Closed
fluiddot opened this issue Aug 2, 2023 · 0 comments · Fixed by #59833
Closed

Enable virtualization for the block list on iOS #53265

fluiddot opened this issue Aug 2, 2023 · 0 comments · Fixed by #59833
Assignees
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Performance Related to performance efforts

Comments

@fluiddot
Copy link
Contributor

fluiddot commented Aug 2, 2023

What problem does this address?

Following this comment, on iOS despite the use of FlatList component for rendering the block list, we are not benefitting from list virtualization due to nesting the FlatList under a scroll view. Lack of virtualization implies a high device resource consumption, especially in long posts.

What is your proposed solution?

Unify the ScrollView and FlatList rendering into a single FlatList component.

  • Create an animated component for the FlatList.
  • Move props passed from the ScrollView to the FlatList.
  • Make necessary adjustments.

<AnimatedScrollView
automaticallyAdjustContentInsets={ false }
contentInset={ contentInset }
keyboardShouldPersistTaps="handled"
onContentSizeChange={ onContentSizeChange }
onScroll={ scrollHandler }
ref={ getRef }
scrollEnabled={ scrollEnabled }
scrollEventThrottle={ 16 }
style={ style }
>
<FlatList { ...props } />
</AnimatedScrollView>

@fluiddot fluiddot added [Type] Performance Related to performance efforts Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) labels Aug 2, 2023
@geriux geriux self-assigned this Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Type] Performance Related to performance efforts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants