Skip to content

Commit 5707b9d

Browse files
Increase FlatList batch size
1 parent e90b043 commit 5707b9d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/InvertedFlatList/BaseInvertedFlatList.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ class BaseInvertedFlatList extends Component {
136136
// Native platforms do not need to measure items and work fine without this.
137137
// Web requires that items be measured or else crazy things happen when scrolling.
138138
getItemLayout={this.props.shouldMeasureItems ? this.getItemLayout : undefined}
139-
// We keep this property very low so that chat switching remains fast
140-
maxToRenderPerBatch={1}
139+
// Keep batch size relatively small for responsiveness, but not too small as it will cause
140+
// excessive rendering. See https://github.com/Expensify/App/pull/19345 for performance testing
141+
// of this value.
142+
maxToRenderPerBatch={10}
141143
windowSize={15}
142144

143145
// Commenting the line below as it breaks the unread indicator test

0 commit comments

Comments
 (0)