-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[CollectionView] Review Strategies to reduce Child Measure Propagation #25391
Comments
Would all these changes possibly solve this issue where we are getting endless remeasures and arranges on translation change in iOS? This seems like more a general issue than just specific to CollectionView, since it is happening everywhere in the Layout system, no? @albyrock87 I see you have been digging into the Layout system quite heavily and you always have good ideas. Any thoughts? If you are developing "custom layout update modes" for scrolling and other objects, the it would be important for us to have access to enabling those on our own Layout objects as well. I observe no such "special modes" are needed in Xamarin, because the layout system just works properly. Thanks for any thoughts and your continued hard work. |
I'll try to dig more into the issue you reported @jonmdev . Just know that before SR9 the MeasureInvalidated event was not being propagated to ancestors if not using legacy layouts. |
Okay let's continue that discussion in the other thread, but to clarify, none of "ContentView", "VerticalStackLayout" or "Grid" or "ScrollView" were used. Only AbsoluteLayout which is still a necessary Layout method as it is the simplest and purest one for manual layouts. We have no other option for manual and simple layouts, that I know of. I don't use any "ContentView", "VerticalStackLayout" or "Grid" or "ScrollView" in any of my projects as I just manage my own Layouts using AbsoluteLayout. I linked the code I used in that thread so you can see again. Thanks as always. |
Please revert the changes. What took <0.1 seconds with a MAUI-Version prior to 8.0.9x now takes more than 1 second. |
@FlavioGoncalves-Cayas would you be able to create a how-to-repro to demonstrate this huge slow down? I think that'd help to better understand the impact and prioritize a fix. I already have a few PRs in place to fix/improve this. |
Here is a rudimentary repro: https://github.com/FlavioGoncalves-Cayas/InvalidateMeasureIssueRepro The layout in the production app where I stumbled upon the issue is more complex, so that the impact is more noticeable. I tried to compensate for it by adding more items to the bindablelayout in the repro. The custom grid is my attempt at trying to measure how long the measure takes. I am not planning to spend an awful lot of time on an accurate reproduction. EDIT: The main problem I see is that all items are measured once again even when the single item where the change occurred did not even change its height |
I just pushed a change to the repro, as I was not getting a different behavior between Android and iOS. |
@FlavioGoncalves-Cayas that's what I thought. So the impact should not be that huge. Regarding native iOS invalidation topic, this has never been that smart, I have a PR opened to do an initial refactor which may allow us to make it smart in the near future. |
@albyrock87 |
We're proposing this #25324 to be included in a very small .NET8 service release. |
Description
#23052 fixed some serious issues with iOS but it would ideal to dial this back some in scenarios where it's not necessary to bubble up invalidation events.
For example #25264
MeasureFirstItem
Contraints
The text was updated successfully, but these errors were encountered: