https://kotlinlang.org logo
#compose
Title
# compose
s

Sergey Y.

03/06/2024, 12:01 AM
Hey everyone, I've been digging into my app's performance, and I found that some of my composables are never skippable. So, I ran Compose compiler reports to see the actual stability of classes and functions, and I was surprised by some weirdness. Any insights or help would be greatly appreciated! Details in the thread 🧵
In my app's state class, one particular but important property was inferred as unstable, regardless of the compiler config and explicit class annotations. However, other similar properties were recognized as stable. I'm wondering if there's something wrong with the
stableRenderableGroups: ImmutableList<StableRenderableGroup>
property. `compose-bom = "2024.02.01`"
StableRenderableGroup and the subclasses are stable:
Hm, adding the
StableRenderableGroup
class to the Compose compiler configuration file marked this property as stable, which is weird. But why it ignored the annotations? Now the composable function is skippable, but if anyone knows the reason for such behavior, I would like to know to avoid or avert such behavior in the future. 🙂
b

Ben Trengrove [G]

03/06/2024, 12:33 AM
I think you have hit the exact bug I am working on right now. Basically, if we hit nested generic classes when analysing stability we declare them as unstable
❤️ 1
i

Ian Lake

03/06/2024, 12:35 AM
That would be https://android-review.googlesource.com/c/platform/frameworks/support/+/2988009 for those without Google Corp access 🙂
b

Ben Trengrove [G]

03/06/2024, 12:36 AM
Doh 😆
i

Ian Lake

03/06/2024, 12:36 AM
👍 1
1
s

Sergey Y.

03/06/2024, 12:37 AM
Oh nice, this one I can easily track, and I'll be eagerly awaiting the fix.
b

Ben Trengrove [G]

03/06/2024, 12:51 AM
It will be in the compiler release once merged
❤️ 1
thank you color 2
2 Views