Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .jules/bolt.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2024-04-13 - Missing React.memo for FlatList Items
**Learning:** The React Native FlatList components in this codebase frequently render unmemoized inline items (like `ContactRow`, `PasswordRow`, etc.), causing unnecessary re-renders of the entire list when individual state changes.
**Action:** Always wrap long list item components in `React.memo()` to prevent cascading re-renders and improve FlatList scrolling performance.
## 2026-04-17 - FlatList Missing Optimization
**Learning:** The project is missing 'initialNumToRender', 'windowSize', 'maxToRenderPerBatch', and 'removeClippedSubviews' attributes for `FlatList` components.
**Action:** Add these attributes to optimize list rendering.
5 changes: 5 additions & 0 deletions src/screens/FlightScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,11 @@ export default function FlightScreen() {
refreshControl={<RefreshControl refreshing={refreshing} onRefresh={() => { setRefreshing(true); fetchAll(); }} tintColor={colors.primary} />}
ListEmptyComponent={<Text style={{ textAlign: 'center', marginTop: 40, color: '#9CA3AF', fontSize: 15 }}>{t('flightNoFlights')}</Text>}
showsVerticalScrollIndicator={false}
// Performance optimization: improve rendering efficiency of large lists
initialNumToRender={10}
windowSize={5}
maxToRenderPerBatch={10}
removeClippedSubviews={true}
/>
)}

Expand Down
Loading