-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance issue in lazy grid #1866
Comments
Thanks for the repro project. Which device did you run the tests on? |
Samsung S21 Ultra, Android 13 |
Not sure if that helps, but updated the app with identical grid just with Glide image loading. It has noticeably fewer janky frames in profiler and looks/feels much smoother. |
Same problem here, seems to use a lot of memory! Up to 2gigs of memory in my app when scrolling in lazy column with images. |
Same issue janky frames with grid |
Same problem in release and debug mode. |
Is there any progress on this issue |
I've added benchmark and tracing here to make diagnosing this easier: matejdro/ComposeGridPerformance@beb902c Here is an example trace file (from Pixel 7 Pro): ScrollBenchmark_scrollImageList_iter003_2023-12-21-08-27-41.perfetto-trace.zip Not sure why the trace is so weird (it shows one big compose event spanning multiple seconds), but you can still drill down and it appears that |
Im noticing a heavy jank in scrolling with LazyGrid as well. In my application |
I am simple loading local images and showing with coil. There is a noticeable lagging (skipping lots of frames) especially in older devices. coil.performance.mov |
Same problem here with Coil's Compose Sample: Screen_Recording_20240207_165837_Coil.mp4Coil version: |
It looks like it's not just related to LazyGrid. Screen_Recording_20240208_133733_Coil.mp4 |
Hope I can somehow help with this. I am using |
I have the same error, I'm using a LazyVerticalGrid with +8k items (I'm also using pagination), after fast scrolling through more than 3k items, the application gets super slow, even the android emulator stops working. |
Does it still happen on 2.6.0? |
@Cj-Rodriguez101 happens to me with a |
Facing same issue with |
I'd like to add that setting a fixed height to either |
Thank you for sharing! This did work in one of my apps. There are some UI experiences where this is not possible, though. For example in staggered grid views where items can have different heights depending on their content. That's where I encountered the issue. |
Yeah, this is just a workaround I found by trial and error. It cannot really cover all of the use cases. I really hope this bug gets fixed soon. |
Hey folks if you're having performance issues I'd recommend trying the latest Also I'd heavily recommend avoiding Also performance will be much worse in debug builds as Compose includes instrumentation info; this is expected behaviour. Running a release build with R8 enabled should solve most performance issues. |
It got better after upgrading to 2.7.0, but still jittering. I've added a plain image (just for isolating coil) and I still got skipping frames on my 120hz pixel 7 pro. I suspect the Lazy Grid is becoming the issue from this point. |
Same here, I develop on low-end TV-Box and if I have a grid of 4 columns. When I scroll down, the render is very laggy when it's not in cache and then it becomes usable, but still laggy. |
Description
Compose performance issue in super simple app which just displays network images list using Coil.
We see noticeable jank while scrolling even though:
Jank is visible by human eye and also in profiler:
https://github.com/PauliusVal/ComposeGridPerformance/blob/main/images/images_grid_janky_frames_1.png?raw=true
Full app code and more screenshots: https://github.com/PauliusVal/ComposeGridPerformance/tree/main
Version
Coil version:
io.coil-kt:coil-compose:2.4.0
The text was updated successfully, but these errors were encountered: