From bb760400feaf4bab668fc2532a4de64e6833200a Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Wed, 25 Jun 2025 17:23:09 -0500 Subject: A few perf params for threads v2 (#8567) Co-authored-by: Hailey --- src/screens/PostThread/index.tsx | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'src/screens/PostThread/index.tsx') diff --git a/src/screens/PostThread/index.tsx b/src/screens/PostThread/index.tsx index 350fc41ae..f6ab554b6 100644 --- a/src/screens/PostThread/index.tsx +++ b/src/screens/PostThread/index.tsx @@ -45,7 +45,7 @@ const CHILDREN_CHUNK_SIZE = 50 export function PostThread({uri}: {uri: string}) { const {gtMobile} = useBreakpoints() const {hasSession} = useSession() - const initialNumToRender = useInitialNumToRender() // TODO + const initialNumToRender = useInitialNumToRender() const {height: windowHeight} = useWindowDimensions() const anchorPostSource = useUnstablePostSource(uri) const feedFeedback = useFeedFeedback(anchorPostSource?.feed, hasSession) @@ -522,7 +522,7 @@ export function PostThread({uri}: {uri: string}) { })} onStartReached={onStartReached} onEndReached={onEndReached} - onEndReachedThreshold={2} + onEndReachedThreshold={4} onStartReachedThreshold={1} /** * NATIVE ONLY @@ -530,6 +530,7 @@ export function PostThread({uri}: {uri: string}) { */ maintainVisibleContentPosition={{minIndexForVisible: 0}} desktopFixedHeight + sideBorders={false} ListFooterComponent={ } initialNumToRender={initialNumToRender} - windowSize={11} - sideBorders={false} + /** + * Default: 21 + */ + windowSize={7} + /** + * Default: 10 + */ + maxToRenderPerBatch={5} + /** + * Default: 50 + */ + updateCellsBatchingPeriod={100} /> )} -- cgit 1.4.1