vide
01/07/2023, 6:54 PMrestartable skippable scheme("[androidx.compose.ui.UiComposable]") fun MenuButton(
stable menuOpen: Boolean = @dynamic LiveLiterals$NavBarKt.Boolean$param-menuOpen$fun-MenuButton()
stable setMenuOpen: Function1<Boolean, Unit>
defaultFocusRequester: FocusRequester
stable onWidthChange: Function1<Dp, Unit>
)
The problem goes away from defaultFocusRequester is removed from the parameters, so it's definitely related to that. The object that is passed is the same on every recomposition, but it never skips. Is there a bug in compose metrics reporting the function as skippable? 🤔 Note how the problematic parameter is not marked as stable but the function is still marked skippable in the report.robercoding
01/08/2023, 9:39 AM@Stable
I'd love to see someone from Compose team answer why the function is marked as skippable when one of the parameters is not stable, maybe because FocusRequester
is from a compose library or?vide
01/08/2023, 10:06 PMvide
01/08/2023, 10:07 PMvide
01/09/2023, 5:50 PMMutableVector
member (FocusRequester
does). I am not sure what the compose compiler infers the stability to be, but it's definitely not stable or unstable 😅Zach Klippenstein (he/him) [MOD]
01/09/2023, 11:17 PMMutableVector
is not stable, by definition, and so the compiler can’t infer that anything that uses it is stable. FocusRequester
should behave as stable though AFAICT, so it is probably a good candidate for overriding the inference.vide
01/09/2023, 11:26 PMFocusRequester
seems to behave like it would be stablevide
01/09/2023, 11:27 PMMutableVector
be inferred as Unstable though? It's currently not inferred as either stable or unstable.Zach Klippenstein (he/him) [MOD]
01/09/2023, 11:46 PMZach Klippenstein (he/him) [MOD]
01/09/2023, 11:46 PMvide
01/10/2023, 12:07 AM