[iOS] Improve background layer frame mapping performance#24848
Merged
PureWeen merged 10 commits intoDec 10, 2024
Conversation
Member
|
/azp run |
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
Failing tests definitely unrelated :) |
rmarinho
reviewed
Sep 23, 2024
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
8947b0b to
9d24253
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
9d24253 to
b235d2a
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
b235d2a to
9eae070
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
Failed test is unrelated. |
4 tasks
Contributor
Author
|
I've included @Tamilarasan-Paranthaman UI test from #26222 |
|
Azure Pipelines successfully started running 3 pipeline(s). |
Member
|
/rebase |
PureWeen
requested changes
Dec 9, 2024
Contributor
There was a problem hiding this comment.
Copilot reviewed 13 out of 28 changed files in this pull request and generated no suggestions.
Files not reviewed (15)
- src/Controls/tests/TestCases.HostApp/Issues/Issue26057.xaml: Language not supported
- src/Compatibility/Core/src/iOS/Renderers/FrameRenderer.cs: Evaluated as low risk
- src/Compatibility/Core/src/iOS/Renderers/PageRenderer.cs: Evaluated as low risk
- src/Compatibility/Core/src/iOS/VisualElementRenderer.cs: Evaluated as low risk
- src/Controls/src/Core/Compatibility/Handlers/iOS/FrameRenderer.cs: Evaluated as low risk
- src/Controls/src/Core/Platform/iOS/Extensions/BrushExtensions.cs: Evaluated as low risk
- src/Controls/tests/TestCases.HostApp/Issues/Issue24847.cs: Evaluated as low risk
- src/Controls/tests/TestCases.HostApp/Issues/Issue26057.xaml.cs: Evaluated as low risk
- src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue24847.cs: Evaluated as low risk
- src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue26057.cs: Evaluated as low risk
- src/Core/src/Handlers/View/ViewHandler.iOS.cs: Evaluated as low risk
- src/Core/src/Platform/iOS/CALayerAutosizeObserver.cs: Evaluated as low risk
- src/Core/src/Platform/iOS/ContentView.cs: Evaluated as low risk
- src/Core/src/Platform/iOS/IAutoSizableCALayer.cs: Evaluated as low risk
- src/Core/src/Platform/iOS/LayerExtensions.cs: Evaluated as low risk
# Conflicts: # src/Core/src/PublicAPI/net-ios/PublicAPI.Unshipped.txt # src/Core/src/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
Member
|
/azp run |
PureWeen
approved these changes
Dec 10, 2024
|
Azure Pipelines successfully started running 3 pipeline(s). |
Member
|
Changes applied
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
This PR
Obsoletes a couple of methods.Description of Change
Using https://github.com/davidortinau/AllTheLists app, and scrolling through collection view with
Borderinside we can clearly see that a good amount of time is spent inUpdateBackgroundLayerFramewhich is needed to sync the sublayer with theUIView.Layer.This has an impact on both

MappingFrameandContentView.LayoutSubviews:Which translated to these timings


This PR gets rid of all mapping frame code and simply adds an observer on the sublayer.
As a result we get a lot of improvement (80%):


While the new observer is super fast

Issues Fixed
Fixes #24847
Fixes #26057
Fixes #20218
Closes #26222