alxdthn
11/02/2023, 5:38 PMrememberInfiniteTransition
and Modifier.drawWithContent
already exceeds 16.67ms. Is this intended, or am I doing something wrong?ascii
11/02/2023, 5:54 PManimation
with by
instead of = and .value?alxdthn
11/02/2023, 6:58 PMby
the sameascii
11/02/2023, 7:29 PMalxdthn
11/02/2023, 7:37 PMrememberInfiniteTransition
outside, but still got the same result. It seems like every tick of InfiniteTransition
blocks the render thread.animatedAlpha
state).shikasd
11/02/2023, 10:25 PMNader Jawad
11/02/2023, 10:33 PMalxdthn
11/02/2023, 11:17 PMModifier.composed
. Also Modifier.drawWithContent
is implemented based on Modifier.Node
.ephemient
11/03/2023, 5:33 AMBox(
modifier = Modifier
.size(72.dp)
.graphicsLayer { alpha = animatedAlpha }
.background(Color.Red)
)
to perform betteralxdthn
11/03/2023, 8:23 AMModifier.drawWithContent
because the snippet only reflects the idea embedded in the implementation of my solution. But it does’t matter. Regardless of how I implement it, whether using Modifier.graphicsLayer
or Modifier.alpha
, the result remains the same. Therefore, I assume the problem lies somewhere in InfiniteTransition
.ascii
11/03/2023, 8:57 AMalxdthn
11/03/2023, 10:37 AMshikasd
11/03/2023, 2:18 PMSergey Y.
11/03/2023, 2:27 PMNo idea why it so unstableThere are two potential reasons for what you're seeing: 1. You're getting a performance boost because the app is fully compiled ahead of time (AOT). Sometimes, you might need to restart the app to notice the improvements. (You also, can request full AOT via ADB commands to verify if it is the case); 2. It could also be device-specific. Certain devices, like Samsung, might lower the screen refresh rate if there's no user interaction with screen.
ascii
11/03/2023, 2:33 PMalxdthn
11/03/2023, 2:38 PMHave you tested it on a real device or an emulatorBoth. Also with baseline_profile or not. It remains unstable, similar to what’s shown in this video. It seems to be related to AOT
ascii
11/03/2023, 2:45 PMSergey Y.
11/03/2023, 2:59 PMascii
11/03/2023, 3:01 PMs3rius
11/05/2023, 3:15 PMSergey Y.
11/05/2023, 3:18 PMs3rius
11/05/2023, 3:37 PMSergey Y.
11/05/2023, 3:43 PM