Skip to content

Perf/remove clipped subviews#445

Open
Faromzy wants to merge 3 commits into
rinafcode:mainfrom
Faromzy:perf/remove-clipped-subviews
Open

Perf/remove clipped subviews#445
Faromzy wants to merge 3 commits into
rinafcode:mainfrom
Faromzy:perf/remove-clipped-subviews

Conversation

@Faromzy
Copy link
Copy Markdown

@Faromzy Faromzy commented May 27, 2026

perf: Enable removeClippedSubviews on ScrollView and FlatList

Summary

Adds removeClippedSubviews={true} to all scrollable list components to unmount
off-screen items from the native view hierarchy, reducing memory pressure and
improving scroll performance.

Changes

  • FlatList — DownloadQueue, ConnectionManager, MobileSearch
  • ScrollView — MobileProfile, LessonCarousel, PaymentHistory, BookmarkList,
    SubscriptionManager, MobileSettings, MobileCourseViewer, NotificationSettings,
    QuizCarousel, MobileRegister, MobileLogin, MobileSyllabus, FilterSheet,
    QuizResults, MobileQuizManager, MobileQuestionCard, AchievementBadges,
    GridFiltering, AdvancedDataGrid, app/(tabs)/index

Intentionally skipped:

  • SearchHistory — scrollEnabled={false}, prop has no effect
  • SettingsPicker — small bounded dropdown, not a long list
  • parallax-scroll-view — uses Animated.ScrollView; prop could interfere with
    the parallax animation

Also fixes two pre-existing ESLint errors that were blocking the commit:

  • Unescaped apostrophes in MobileProfile and MobileLogin
  • Incorrect @/src/* import aliases in app/(tabs)/index.tsx (should be @/*)

Performance Impact

┌────────┬────────┬────────────────┐
│ Metric │ Before │ After (target) │
├────────────────────────────┼────────┼────────────────┤
│ Native views during scroll │ 500+ │ 20–30 │
├────────────────────────────┼────────┼────────────────┤
│ Reduction │ — │ ~95% │
└────────────────────────────┴────────┴────────────────┘

Testing

Faromzy added 2 commits May 27, 2026 23:04
Unmounts off-screen items in DownloadQueue, ConnectionManager, and
MobileSearch to reduce native view count and improve scroll performance.
VirtualList, TopicFeed, and AdvancedDataGrid already had this set.
Unmount off-screen items to reduce native view count during scroll.
Targets ~95% reduction in mounted views (500+ to 20-30).

Also fix pre-existing ESLint errors:
- Fix unescaped apostrophes in MobileProfile and MobileLogin
- Fix incorrect @/src/* import aliases in app/(tabs)/index.tsx
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 27, 2026

@Faromzy Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

kindly resolve conflict and fix workflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optimize ScrollView/FlatList rendering with removeClippedSubviews

2 participants