A few perf params for threads v2 (#8567)

Co-authored-by: Hailey <me@haileyok.com>
This commit is contained in:
Eric Bailey
2025-06-25 17:23:09 -05:00
committed by GitHub
parent ab4148dc06
commit bb760400fe
+15 -4
View File
@@ -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}
/>
)}