Hello everyone, I am using
coil compose for image rendering, but unfortunately, I am encountering some / very laggy behavior. I have created a sample screen with the code snippet below, and the performance is still not as good as when using RecyclerView.
The images I am using have a high resolution, and when I render multiple images on the screen, the lag becomes noticeable. However, when I only render four large images, the performance improves significantly.
According to the documentation, the coil supports downsampling images and has a caching mechanism. I am wondering if I have implemented the coil incorrectly. I am using coil version 2.6.0.
It's interesting to note that when optimizations like caching or key are applied, the nested list with coil performs worse than RecyclerView. To ensure better performance of Compose, we used the release build, but it still underperformed compared to RecyclerView. Our testing was conducted on a Redmi 9C (low middle end device).
I would greatly appreciate any suggestions on how to improve the performance of the coil or why it might be performing poorly compared to RecyclerView.
Video comparison Coil (left) Vs RecyclerView (right)