kopia lustrzana https://github.com/vitorpamplona/amethyst
Displays feed performance measurement before clipping to 1000 objects
rodzic
9ee3da3910
commit
58f1515387
|
@ -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>
|
||||
|
|
Ładowanie…
Reference in New Issue