Source: perf audit of the Paging 3 usage (finding #1).
The unified "All inboxes" list is paged (Room PagingSource → Pager, issue #124), but its PagingConfig leaves maxSize at the default Int.MAX_VALUE, so loaded pages are never evicted — deep scrolling accumulates every page in memory. It's a grow-only window, not the bounded sliding window the pattern intends.
Location: the only PagingConfig in the app — MailRepositoryImpl.pagedUnifiedFolderMessages (app/src/main/kotlin/org/libremail/data/repository/MailRepositoryImpl.kt:92): pageSize=40, initialLoadSize=120, enablePlaceholders=false, maxSize unset, prefetchDistance default (=40).
Fix: set maxSize to a finite value (e.g. 200, ~5 pages) so eviction bounds resident rows regardless of scroll depth. Must satisfy maxSize >= pageSize + 2*prefetchDistance (= 40 + 80 = 120). Safe with enablePlaceholders=false: the list rendering already null-guards evicted positions and "select all" reads only the loaded snapshot.
**Source:** perf audit of the Paging 3 usage (finding #1).
The unified "All inboxes" list is paged (Room `PagingSource` → `Pager`, issue #124), but its `PagingConfig` leaves **`maxSize` at the default `Int.MAX_VALUE`**, so loaded pages are **never evicted** — deep scrolling accumulates every page in memory. It's a grow-only window, not the bounded sliding window the pattern intends.
**Location:** the only `PagingConfig` in the app — `MailRepositoryImpl.pagedUnifiedFolderMessages` (`app/src/main/kotlin/org/libremail/data/repository/MailRepositoryImpl.kt:92`): `pageSize=40`, `initialLoadSize=120`, `enablePlaceholders=false`, **`maxSize` unset**, `prefetchDistance` default (=40).
**Fix:** set `maxSize` to a finite value (e.g. `200`, ~5 pages) so eviction bounds resident rows regardless of scroll depth. Must satisfy `maxSize >= pageSize + 2*prefetchDistance` (= 40 + 80 = 120). Safe with `enablePlaceholders=false`: the list rendering already null-guards evicted positions and "select all" reads only the loaded snapshot.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Source: perf audit of the Paging 3 usage (finding #1).
The unified "All inboxes" list is paged (Room
PagingSource→Pager, issue #124), but itsPagingConfigleavesmaxSizeat the defaultInt.MAX_VALUE, so loaded pages are never evicted — deep scrolling accumulates every page in memory. It's a grow-only window, not the bounded sliding window the pattern intends.Location: the only
PagingConfigin the app —MailRepositoryImpl.pagedUnifiedFolderMessages(app/src/main/kotlin/org/libremail/data/repository/MailRepositoryImpl.kt:92):pageSize=40,initialLoadSize=120,enablePlaceholders=false,maxSizeunset,prefetchDistancedefault (=40).Fix: set
maxSizeto a finite value (e.g.200, ~5 pages) so eviction bounds resident rows regardless of scroll depth. Must satisfymaxSize >= pageSize + 2*prefetchDistance(= 40 + 80 = 120). Safe withenablePlaceholders=false: the list rendering already null-guards evicted positions and "select all" reads only the loaded snapshot.