A few perf params for threads v2 (#8567)
Co-authored-by: Hailey <me@haileyok.com>
This commit is contained in:
@@ -45,7 +45,7 @@ const CHILDREN_CHUNK_SIZE = 50
|
|||||||
export function PostThread({uri}: {uri: string}) {
|
export function PostThread({uri}: {uri: string}) {
|
||||||
const {gtMobile} = useBreakpoints()
|
const {gtMobile} = useBreakpoints()
|
||||||
const {hasSession} = useSession()
|
const {hasSession} = useSession()
|
||||||
const initialNumToRender = useInitialNumToRender() // TODO
|
const initialNumToRender = useInitialNumToRender()
|
||||||
const {height: windowHeight} = useWindowDimensions()
|
const {height: windowHeight} = useWindowDimensions()
|
||||||
const anchorPostSource = useUnstablePostSource(uri)
|
const anchorPostSource = useUnstablePostSource(uri)
|
||||||
const feedFeedback = useFeedFeedback(anchorPostSource?.feed, hasSession)
|
const feedFeedback = useFeedFeedback(anchorPostSource?.feed, hasSession)
|
||||||
@@ -522,7 +522,7 @@ export function PostThread({uri}: {uri: string}) {
|
|||||||
})}
|
})}
|
||||||
onStartReached={onStartReached}
|
onStartReached={onStartReached}
|
||||||
onEndReached={onEndReached}
|
onEndReached={onEndReached}
|
||||||
onEndReachedThreshold={2}
|
onEndReachedThreshold={4}
|
||||||
onStartReachedThreshold={1}
|
onStartReachedThreshold={1}
|
||||||
/**
|
/**
|
||||||
* NATIVE ONLY
|
* NATIVE ONLY
|
||||||
@@ -530,6 +530,7 @@ export function PostThread({uri}: {uri: string}) {
|
|||||||
*/
|
*/
|
||||||
maintainVisibleContentPosition={{minIndexForVisible: 0}}
|
maintainVisibleContentPosition={{minIndexForVisible: 0}}
|
||||||
desktopFixedHeight
|
desktopFixedHeight
|
||||||
|
sideBorders={false}
|
||||||
ListFooterComponent={
|
ListFooterComponent={
|
||||||
<ListFooter
|
<ListFooter
|
||||||
/*
|
/*
|
||||||
@@ -551,8 +552,18 @@ export function PostThread({uri}: {uri: string}) {
|
|||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
initialNumToRender={initialNumToRender}
|
initialNumToRender={initialNumToRender}
|
||||||
windowSize={11}
|
/**
|
||||||
sideBorders={false}
|
* Default: 21
|
||||||
|
*/
|
||||||
|
windowSize={7}
|
||||||
|
/**
|
||||||
|
* Default: 10
|
||||||
|
*/
|
||||||
|
maxToRenderPerBatch={5}
|
||||||
|
/**
|
||||||
|
* Default: 50
|
||||||
|
*/
|
||||||
|
updateCellsBatchingPeriod={100}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user