Displays feed performance measurement before clipping to 1000 objects

pull/340/head
Vitor Pamplona 2023-04-07 14:24:00 -04:00
rodzic 9ee3da3910
commit 58f1515387
1 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -8,11 +8,11 @@ abstract class FeedFilter<T>() {
@OptIn(ExperimentalTime::class)
fun loadTop(): List<T> {
val (feed, elapsed) = measureTimedValue {
feed().take(1000)
feed()
}
Log.d("Time", "${this.javaClass.simpleName} Feed in $elapsed with ${feed.size} objects")
return feed
return feed.take(1000)
}
abstract fun feed(): List<T>