Has anyone tried using Compose on iOS for smaller subviews, like an image component? I’m curious if ...
j
Has anyone tried using Compose on iOS for smaller subviews, like an image component? I’m curious if people have run into any issues, particularly freezing when a decent number of these components are visible on the same screen.
a
The app may stuck if you used all Metal buffers, which number is limited by 32.
j
Interesting, I didn’t know that limit. Would you say the approach of using CMP for small components is advised against, and we should stick to full view controllers?
a
In terms of performance and resource utilization - yes. Full screen or limited number of compose view is would be better option.
j
Is this a CMP limitation? I hadn’t seen this anywhere, if it is I feel like it should be stated in the docs so that people are aware (unless I missed it when I was going through them). In videos like this

https://youtu.be/YKTlW8Qkj0w?si=bK3xti07vS_a7NtW

From KotlinConf this year we see that CMP can be used as “little or as much” as we want and that it works nicely embedding in SwiftUI. Colleagues who were there also said it was being pushed that you could use CMP for smaller components to slowly integrate CMP. I think it should be clearer this approach is maybe not ideal at this time. An image component seemed like a great starting point for a large app, but this limitation stops us doing that.