Ale Stamato
03/21/2024, 10:34 AMContextualFlowRow
vs an inhouse solution we built few months ago, here are the preliminary results:
In house implementation results:
ScrollBenchmark_scroll
frameDurationCpuMs P50 6.7, P90 8.4, P95 8.9, P99 10.6
frameOverrunMs P50 -7.5, P90 -6.1, P95 -5.4, P99 -3.2
ContextualFlowRow results:
ScrollBenchmark_scroll
frameDurationCpuMs P50 6.8, P90 12.6, P95 14.4, P99 18.7
frameOverrunMs P50 -6.6, P90 -1.0, P95 1.0, P99 7.5
I sort of expected worse performance for ContextualFlowRow
assuming it's using SubcomposeLayout
. Should I be concerned with these numbers? Maybe there's optimisations to be done?
I can share the code if ye are interested, it has some proprietary code so i didnt want to really upload to public github cc @uchennafokoye @Uchenna Okoye @jossiwolf TYAle Stamato
03/21/2024, 10:37 AMColton Idle
03/21/2024, 10:39 AMAle Stamato
03/21/2024, 10:41 AMContextualFlowRow
is so easy to use it's absurd, this is all the code you need to achieve smth like that:
ContextualFlowRow(
itemCount = labels.size,
maxLines = 2,
overflow = ContextualFlowRowOverflow.expandIndicator {
val count = this.totalItemCount - shownItemCount
Text("+ $count")
}
) {
val index: Int = it
val label = labels[index]
HSLabel(text = label.text, style = label.style, maxLines = 1)
}
Colton Idle
03/21/2024, 10:51 AMjossiwolf
03/21/2024, 3:59 PMShould I be concerned with these numbers?Only if they cause issues in your benchmarks 🙂 But yeah would appreciate if you could share the code, and method traces if you can share any with us
Uchenna Okoye
03/21/2024, 4:58 PMAle Stamato
03/21/2024, 5:16 PM