about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2025-04-08 13:20:03 -0500
committerGitHub <noreply@github.com>2025-04-08 11:20:03 -0700
commit09111ef272f04bbd6a1d7e43f072fdde06133669 (patch)
treebbd8003d858d5881054b2336156e82e03d5f7480
parentb9ed94c7f4e3bbe839b4577e7b4ad7b0aafe101e (diff)
downloadvoidsky-09111ef272f04bbd6a1d7e43f072fdde06133669.tar.zst
Tweak performance settings on Android (#8158)
-rw-r--r--src/screens/Search/Explore.tsx27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/screens/Search/Explore.tsx b/src/screens/Search/Explore.tsx
index faf951ddf..1236005a3 100644
--- a/src/screens/Search/Explore.tsx
+++ b/src/screens/Search/Explore.tsx
@@ -9,7 +9,6 @@ import {msg, Trans} from '@lingui/macro'
 import {useLingui} from '@lingui/react'
 import {useQueryClient} from '@tanstack/react-query'
 
-import {useInitialNumToRender} from '#/lib/hooks/useInitialNumToRender'
 import {useGate} from '#/lib/statsig/statsig'
 import {cleanError} from '#/lib/strings/errors'
 import {sanitizeHandle} from '#/lib/strings/handles'
@@ -208,7 +207,6 @@ export function Explore({
 }) {
   const {_} = useLingui()
   const t = useTheme()
-  const initialNumToRender = useInitialNumToRender()
   const {data: preferences, error: preferencesError} = usePreferencesQuery()
   const moderationOpts = useModerationOpts()
   const gate = useGate()
@@ -931,11 +929,26 @@ export function Explore({
       viewabilityConfig={viewabilityConfig}
       onItemSeen={onItemSeen}
       onEndReached={onLoadMoreFeedPreviews}
-      onEndReachedThreshold={3}
-      initialNumToRender={initialNumToRender}
-      windowSize={9}
-      maxToRenderPerBatch={platform({ios: 5, default: 1})}
-      updateCellsBatchingPeriod={40}
+      /**
+       * Default: 2
+       */
+      onEndReachedThreshold={4}
+      /**
+       * Default: 10
+       */
+      initialNumToRender={10}
+      /**
+       * Default: 21
+       */
+      windowSize={platform({android: 11})}
+      /**
+       * Default: 10
+       */
+      maxToRenderPerBatch={platform({android: 1})}
+      /**
+       * Default: 50
+       */
+      updateCellsBatchingPeriod={platform({android: 25})}
       refreshing={isPTR}
       onRefresh={onPTR}
     />