I was playing around with and learning about Compo...
# compose
v
I was playing around with and learning about Compose Compiler metrics. It seems like I've mostly used best practices everywhere. The only thing that really stood out to me were places that I'm passing a
Painter
in. This results in composables which are
restartable
but not
skippable
. There is some advice that implies it's okay if not everything is not skippable. I am of course using
rememberPainter
everywhere. With all that being said, is something like the report below something to be concerned about? Should the Painters be passed in as a lambda instead?
Copy code
restartable scheme("[androidx.compose.ui.UiComposable]") fun ProcessingScreen(
  stable processingState: ProcessingState
  stable inProgressTitle: String
  stable inProgressSubtitle: String
  unstable inProgressIcon: Painter
  stable successTitle: String
  stable successSubtitle: String
  unstable successIcon: Painter
  stable errorTitle: String
  stable errorSubtitle: String
  unstable errorIcon: Painter
  stable continueButtonText: String
  stable onContinue: Function0<Unit>
  stable retryButtonText: String
  stable onRetry: Function0<Unit>
  stable closeButtonText: String
  stable onClose: Function0<Unit>
)
a
Profiling is the ultimate answer. If you notice any performance issue, you can consider optimize it.
j
I agree. Check the recomposition counter, see if things are recomposing as (often as) expected.