Skip to content

Commit

Permalink
finetuned prefetchDistance
Browse files Browse the repository at this point in the history
  • Loading branch information
mtotschnig committed Sep 27, 2023
1 parent 6f50c8f commit ae8f09c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,14 @@ open class MyExpensesViewModel(
}
}

private val pageSize = if (BuildConfig.DEBUG) 40 else 150
private val pageSize = 150

val items: Map<PageAccount, Flow<PagingData<Transaction2>>> = lazyMap {
Pager(
PagingConfig(
initialLoadSize = pageSize,
pageSize = pageSize,
prefetchDistance = pageSize,
prefetchDistance = 40,
enablePlaceholders = true
),
pagingSourceFactory = pagingSourceFactories.getValue(it)
Expand Down

0 comments on commit ae8f09c

Please sign in to comment.