Skip to content

Cleanup virtual layer measure invalidation #28756

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

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

albyrock87
Copy link
Contributor

@albyrock87 albyrock87 commented Apr 2, 2025

Description of Change

Now that we have merged #28225, and soon will merge #28670, we can finally start getting rid of MeasureInvalidated event and also enhance some features.

/// <summary>
/// A flag that determines whether the measure invalidated event should not be propagated up the visual tree.
/// </summary>
/// <remarks>
/// Propagation will still occur within legacy layout subtrees.
/// </remarks>
internal static bool SkipMeasureInvalidatedPropagation { get; set /* for testing purpose */; } =
	AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.SkipMeasureInvalidatedPropagation", out var enabled) && enabled;

Issues Fixed

Fixes #25264

@albyrock87 albyrock87 requested a review from a team as a code owner April 2, 2025 10:47
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Apr 2, 2025
@jsuarezruiz
Copy link
Contributor

/azp run

@jsuarezruiz jsuarezruiz added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Apr 2, 2025
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@MartyIX
Copy link
Contributor

MartyIX commented Apr 2, 2025

I wonder what the impact of the PR is in terms of performance. Did you happen to measure the impact, please?

@albyrock87
Copy link
Contributor Author

I wonder what the impact of the PR is in terms of performance. Did you happen to measure the impact, please?

I think there's a slight performance improve, these are two examples.

Android:
main: RenderingPerformance: [1161, 145, 50]
PR: RenderingPerformance: [1096, 118, 41]

iOS: (other kind of test)
main: Measure passes: 225, Arrange passes: 241
PR: Measure passes: 221, Arrange passes: 237

Consider that the app switch I've inserted could make this even better.

@PureWeen
Copy link
Member

PureWeen commented Apr 4, 2025

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@rmarinho rmarinho added this to the .NET 9 SR6 milestone Apr 8, 2025
@rmarinho
Copy link
Member

rmarinho commented Apr 8, 2025

Failing tests are not related.

@rmarinho rmarinho merged commit 82b018a into dotnet:main Apr 8, 2025
120 of 128 checks passed
@albyrock87 albyrock87 deleted the streamline-measure-invalidation branch April 8, 2025 15:58
rmarinho added a commit that referenced this pull request Apr 8, 2025
rmarinho added a commit that referenced this pull request Apr 8, 2025
albyrock87 added a commit to albyrock87/maui that referenced this pull request Apr 8, 2025
rmarinho pushed a commit that referenced this pull request Apr 9, 2025
…28872)" (#28873)

* Revert "Revert "Cleanup virtual layer measure invalidation (#28756)" (#28872)"

This reverts commit 4ff875a.

* Fix compatibility unit test
@github-actions github-actions bot locked and limited conversation to collaborators May 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter community ✨ Community Contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MeasureInvalidated events are now fired too often
5 participants