Skip to content
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

Scroll jitter #19383

Open
williambuchanan2 opened this issue Dec 13, 2023 · 14 comments
Open

Scroll jitter #19383

williambuchanan2 opened this issue Dec 13, 2023 · 14 comments
Assignees
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView delighter-sc platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending s/needs-attention Issue has more information and needs another look t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.)
Milestone

Comments

@williambuchanan2
Copy link

williambuchanan2 commented Dec 13, 2023

Description

A few of our users are reporting a really bad and uncontrollable jitter while scrolling after upgrading to .NET 8. It seems to affect all scrolling components but the worst example we have is in a CollectionView.

What seems to happen is while you scroll down, it will suddenly decide to jump back up, then back down, and it will oscillate like that for a varying amount of time (2 - 40 seconds I have observed). Where it ends is random as well - some users are telling me that they can't get past the first 3 posts on our app because it keeps bouncing them back to the top (following a period of intense bouncing).

It only happens on iOS, and it is only happening on some devices. From what I can make out so far it seems to be iPhone 14 onwards, but I don't have a big sample set.

I can't reproduce it at all on my iPhone 13 but one of our team has it as a constant problem on his iPhone 14.

It seems that the affected devices are fully affected (i.e. you can't scroll) while unaffected devices work fine, so it is not an intermittent problem but it is a device specific probem.

I have included a video which shows it happening and an example project, but to repro it you will need to find a device which will make it happen.

https://youtube.com/shorts/6diGf8fBVxY?feature=share

I suspect this is linked to this problem:
#19175
Because the images don't size by themselves we had to put code in to resize them manually. It works, in that we have managed to get the images to appear properly, but I have a feeling the extra processing with this might be a factor in the scroll jitter. With that said though, it seems a lot of others are reporting similar issues with CollectionView (jitter, slow scroll, jumping, etc), so might be unrelated.

Steps to Reproduce

Open repro solution
Tap Image Error
Wait for screen to load
Scroll gently down 1 screen at a time - note that at some point you will lose control of scrolling

Link to public reproduction project repository

https://github.com/williambuchanan2/MauiNavigation

Version with bug

8.0.3

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

7.0.101

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No

Relevant log output

No response

@williambuchanan2 williambuchanan2 added the t/bug Something isn't working label Dec 13, 2023
@jsuarezruiz jsuarezruiz added legacy-area-perf Startup / Runtime performance area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/iOS 🍎 labels Dec 13, 2023
@drasticactions
Copy link
Contributor

Possibly related to #18696

@PureWeen PureWeen added the potential-regression This issue described a possible regression on a currently supported version., verification pending label Dec 13, 2023
@PureWeen PureWeen added this to the Backlog milestone Dec 13, 2023
@ghost
Copy link

ghost commented Dec 13, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@Redth
Copy link
Member

Redth commented Dec 13, 2023

Are you testing this with a Release build on device?

This section is relevant: https://github.com/dotnet/maui/wiki/Profiling-.NET-MAUI-Apps#feature-xyz-was-faster-in-xamarinforms

Basically, in MAUI, in debug mode, the interpreter is used which is slower for scenarios like CollectionView and scrolling through controls. Also even if you have interpreter mode turned off for Debug, there's additional overhead caused by live visual tree which can impact performance as well.

There are some changes coming in the next service for CollectionView performance as well. It would be great if you could try a recent nightly to see if that helps at all too: https://github.com/dotnet/maui/wiki/Nightly-Builds

@Redth Redth added the s/needs-info Issue needs more info from the author label Dec 13, 2023
@ghost
Copy link

ghost commented Dec 13, 2023

Hi @williambuchanan2. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@williambuchanan2
Copy link
Author

Are you testing this with a Release build on device?

This is being reported by real users on release builds. It has nothing to do with debug. In fact it works fine in debug on everything except my iPhone 14 simulator.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-info Issue needs more info from the author labels Dec 13, 2023
@Take-A-Byte
Copy link

I'm facing similar issues with CollectionView. I have added a comment here:
#18696 (comment)

I think the problem is with multiple rerenders/recalculations being made while scrolling. You can see this clearly if you create items of different sizes in the collection view....

Screen.Recording.2023-12-15.at.12.38.04.PM.1.1.mov

The strange thing is that it seems to be related to relative sizing i.e. if I use fixed size, the UI works as expected.
Another thing to note is that, it seems to affect iOS and Mac-catalyst but not Windows.

@haavamoa
Copy link

This has been reported as a bug on iOS from our users with release builds of our apps as well. I can confirm that it had to do cells having different sizes. Lists with items that collaps / expand is where we’ve seen this issue. We had to go back to BindableLayout for this to work as expected on iOS :(

@williambuchanan2
Copy link
Author

We had to go back to BindableLayout for this to work as expected on iOS :(

That's interesting because we tried BindableLayout and had the same issue. But I agree it seems to be related to resizing. In my case it happens when I have images in the layout. As soon as I remove the images the problem goes away.

@williambuchanan2
Copy link
Author

Any update on when this will be looked at? Being slammed by users now because of this problem. @haavamoa ?

@haavamoa
Copy link

For us, its happening due to the resizing. So a workaround for us is to either set the same sizes for the cells, or have another look at the design to see if we can change the design. Afterall, a list with different sizes is not always the best design 😅

@williambuchanan2
Copy link
Author

The problem I have is that the cells contain images of different sizes, so it's hard to set to a fixed size. This is made harder by the fact that images don't size themselves properly inside their parent in iOS (another long running bug which is yet to be fixed).

@rmarinho
Copy link
Member

Does the repo still valid? After I enter Image error I just see this ..

Screenshot 2024-03-14 at 19 20 38

@williambuchanan2
Copy link
Author

Yes it loads fine. It is just a bit slow because the API call it is making now has a lot more data behind it than it did when I first made it so it takes around 2 minutes to load now.

@williambuchanan2
Copy link
Author

image

@Eilon Eilon added t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) and removed legacy-area-perf Startup / Runtime performance labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView delighter-sc platform/iOS 🍎 potential-regression This issue described a possible regression on a currently supported version., verification pending s/needs-attention Issue has more information and needs another look t/bug Something isn't working t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.)
Projects
None yet
Development

No branches or pull requests

10 participants