diff options
author | Eric Bailey <git@esb.lol> | 2025-06-25 17:23:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-25 15:23:09 -0700 |
commit | bb760400feaf4bab668fc2532a4de64e6833200a (patch) | |
tree | 0a1f7f9ee30b116e83058ac51e9423326baa4f7d /src/screens/PostThread/index.tsx | |
parent | ab4148dc06500f10da2bafd5b8132d2d426e0107 (diff) | |
download | voidsky-bb760400feaf4bab668fc2532a4de64e6833200a.tar.zst |
A few perf params for threads v2 (#8567)
Co-authored-by: Hailey <me@haileyok.com>
Diffstat (limited to 'src/screens/PostThread/index.tsx')
-rw-r--r-- | src/screens/PostThread/index.tsx | 19 |
1 files changed, 15 insertions, 4 deletions
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={ <ListFooter /* @@ -551,8 +552,18 @@ export function PostThread({uri}: {uri: string}) { /> } initialNumToRender={initialNumToRender} - windowSize={11} - sideBorders={false} + /** + * Default: 21 + */ + windowSize={7} + /** + * Default: 10 + */ + maxToRenderPerBatch={5} + /** + * Default: 50 + */ + updateCellsBatchingPeriod={100} /> )} |