Skip to content

Commit

Permalink
Increase FlatList batch size
Browse files Browse the repository at this point in the history
  • Loading branch information
janicduplessis committed Sep 19, 2023
1 parent e90b043 commit 5707b9d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/InvertedFlatList/BaseInvertedFlatList.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,10 @@ class BaseInvertedFlatList extends Component {
// Native platforms do not need to measure items and work fine without this.
// Web requires that items be measured or else crazy things happen when scrolling.
getItemLayout={this.props.shouldMeasureItems ? this.getItemLayout : undefined}
// We keep this property very low so that chat switching remains fast
maxToRenderPerBatch={1}
// Keep batch size relatively small for responsiveness, but not too small as it will cause
// excessive rendering. See https://github.com/Expensify/App/pull/19345 for performance testing
// of this value.
maxToRenderPerBatch={10}
windowSize={15}

// Commenting the line below as it breaks the unread indicator test
Expand Down

0 comments on commit 5707b9d

Please sign in to comment.