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
Andrei Salavei
09/27/2025, 6:44 PM
The app may stuck if you used all Metal buffers, which number is limited by 32.
j
James Robinson
09/28/2025, 2:35 PM
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
Andrei Salavei
09/29/2025, 8:20 AM
In terms of performance and resource utilization - yes. Full screen or limited number of compose view is would be better option.
j
James Robinson
10/01/2025, 7:52 AM
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.