Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] CollectionView on Android has a Jank/jitter on first scroll gesture #14233

Open
azrinsani opened this issue May 1, 2021 · 6 comments
Open

Comments

@azrinsani
Copy link

azrinsani commented May 1, 2021

Description

CollectionView on Android has a Jank on first scroll gesture. After that it is somewhat smooth (but not perfect off course). This jank happens everytime the View Model ItemsSource in the collection view is refreshed.
See video here => [https://www.youtube.com/watch?v=ojjIFnx_W9U](https://www.youtube.com/watch?v=ojjIFnx_W9U
and here too (on a higher end phone) => https://youtu.be/e7l2oLngUlk
)

I've done almost everything in google searches to improve Xamarin Scroll Performance and the Xamarin Team has definitely done a lot of good work to solve this scrolling issue. Personally this is the only issue I find with Xamarin Forms Scrolling. Everything else looks good!

What I've done but did not work =>

  1. I removed all images, still early jitter is seen
  2. I removed all animations, still early jitter is seen
  3. Increased Android Nursery Size (as mentioned in https://codetraveler.io/2020/07/12/improving-collectionview-scrolling/)
  4. Enabled Xaml Compilation
  5. Optimized Layouts
  6. Enabled Startup Tracing in Android Project Options

Steps to Reproduce

my github page => https://github.com/azrinsani/UIDesign

  1. Clone project
  2. Build and run under release (I am using Visual Studio 2019 Community Edition)
  3. Scroll down
  4. the Jank/Jitter should be seen
  5. After that everything is ok.

Expected Behavior

Scrolling should not have an initial jank

Actual Behavior

An initial 'jank'/jitter is experienced on the first scroll down gesture. See video https://youtu.be/e7l2oLngUlk

@azrinsani azrinsani added s/unverified New report that has yet to be verified t/bug 🐛 labels May 1, 2021
@angelru
Copy link

angelru commented May 2, 2021

try
#8718

@azrinsani
Copy link
Author

try
#8718

I actually came from that thread before creating this thread. Did everything mentioned on that thread and it did help a lot, however, the initial jitter on scroll is still there.

@jsuarezruiz
Copy link
Contributor

To reproduce the issue, could you share a small example or the code that defines the template of each item along with the basic properties used in the CollectionView?.

@jsuarezruiz jsuarezruiz moved this from New to Needs Info in Triage May 3, 2021
@jsuarezruiz jsuarezruiz added the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label May 3, 2021
@azrinsani
Copy link
Author

azrinsani commented May 4, 2021

Ok I've preapred a small project to demonstrate this

You can clone it from my github page => https://github.com/azrinsani/UIDesign

Just run the project under vs2019 release. You can see that there is a jitter/jank at the first gesture of the collecitonview scroll.

Here is another video demonstrating this =>https://youtu.be/e7l2oLngUlk
(I am running this on a Xiaomi Pocophone F1)

After that, scrolling is silky smooth. I have to admit, Xamarin Forms have greatly improved! It's just this last annoying thing which I am trying to resolve.

I also like to point out that I've done the following to Optimize the Collection View in the project I prepared

@Redth Redth removed the s/needs-info ❓ A question has been asked that requires an answer before work can continue on this issue. label May 11, 2021
@Redth Redth moved this from Needs Info to New in Triage May 11, 2021
@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Jun 14, 2021
@jsuarezruiz jsuarezruiz moved this from New to Needs Estimate in Triage Jun 14, 2021
@jsuarezruiz jsuarezruiz added this to Review Backlog in CollectionView via automation Jun 14, 2021
@hunsra
Copy link

hunsra commented Feb 2, 2022

I have the same issue with CollectionView on Android.

@roubachof
Copy link

maybe rule n°2 could help here:
https://www.sharpnado.com/xamarin-forms-maui-collectionview-performance-the-10-golden-rule/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
CollectionView
  
Review Backlog
Triage
  
Needs Estimate
Development

No branches or pull requests

6 participants