Skip to content

Commit b225b53

Browse files
authored
Merge pull request #19345 from janicduplessis/@janic/reports-perf-2
Increase VirtualizedList batch size on iOS and Android
2 parents d7205e5 + 2c16083 commit b225b53

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/InvertedFlatList/BaseInvertedFlatList.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,6 @@ 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}
141139
windowSize={15}
142140

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

src/components/InvertedFlatList/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,9 @@ function InvertedFlatList(props) {
119119
shouldMeasureItems
120120
contentContainerStyle={StyleSheet.compose(contentContainerStyle, styles.justifyContentEnd)}
121121
onScroll={handleScroll}
122+
// We need to keep batch size to one to workaround a bug in react-native-web.
123+
// This can be removed once https://github.com/Expensify/App/pull/24482 is merged.
124+
maxToRenderPerBatch={1}
122125
/>
123126
);
124127
}

0 commit comments

Comments
 (0)