Reasons for the lag of smooth scrolling on lazy column in android jetpack compose

130 Views Asked by At

I just use the lazy column for showing the my custom items on the view. I tried with this with itemsIndexed with as well. But lagging issue is not solved.

What can be the reasons for this?

1

There are 1 best solutions below

1
Sevban Bayır On BEST ANSWER

Since you did not share any code anyone cannot give a specific reason for this to you but generally there are bunch of optimization tricks you can apply like:

  • passing a unique key to your LazyColumn,
  • running it in release build instead of debug
  • if your "custom items" include an image, making sure the image library use use contains a cacheing mechanism
  • using @Stable, @Immutableannotations in your ui state data classes etc.