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

[Windows] Improve performance in accessibility extensions #22698

Merged

Conversation

MartyIX
Copy link
Contributor

@MartyIX MartyIX commented May 29, 2024

Description of Change

The second commit 5eda2f2 shows the idea of the improvement.

Performance impact

image

-> ~43% improvement

Issues Fixed

Contributes to #21787

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label May 29, 2024
@MartyIX MartyIX force-pushed the feature/2024-05-29-AccessibilityExtensions-perf branch 2 times, most recently from 6447eeb to 646510e Compare May 29, 2024 08:50
@MartyIX
Copy link
Contributor Author

MartyIX commented May 29, 2024

@jsuarezruiz Would you please tell me how to fix:

  • src\Controls\src\Core\PublicAPI\net-windows\PublicAPI.Shipped.txt
  • src\Controls\src\Core\PublicAPI\net-windows\PublicAPI.Unshipped.txt

files?

if (_defaultAutomationPropertiesHelpText is null)
{
_defaultAutomationPropertiesHelpText = currentValue = (string)Control.GetValue(NativeAutomationProperties.HelpTextProperty);
}

#pragma warning disable CS0618 // Type or member is obsolete
var elemValue = (string)Element.GetValue(AutomationProperties.HelpTextProperty);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I get it right, this line should be changed to:

var elemValue = SemanticProperties.GetHint(Element);

to fix the "obsolete" warning. Is that right? Should it be done now?

@MartyIX MartyIX force-pushed the feature/2024-05-29-AccessibilityExtensions-perf branch from 2ad4c81 to 7fdc882 Compare May 29, 2024 19:14
@MartyIX MartyIX marked this pull request as ready for review May 29, 2024 19:19
@MartyIX MartyIX requested a review from a team as a code owner May 29, 2024 19:19
@MartyIX MartyIX force-pushed the feature/2024-05-29-AccessibilityExtensions-perf branch 2 times, most recently from 3a9a34c to 7fdc882 Compare May 31, 2024 07:16
@PureWeen PureWeen added area-core-platform Integration with platforms t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf) labels May 31, 2024
@jsuarezruiz
Copy link
Contributor

/azp run

@dotnet dotnet deleted a comment from azure-pipelines bot Jun 12, 2024
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Member

@jonathanpeppers jonathanpeppers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The general idea here looks ok:

  • Don't set automation properties
  • If the value hasn't changed

But I think someone else should also review. 👍

@MartyIX
Copy link
Contributor Author

MartyIX commented Jun 18, 2024

@rmarinho Could you take a look please?

@MartyIX
Copy link
Contributor Author

MartyIX commented Jun 24, 2024

@mattleibow Could you take a look please?

@PureWeen PureWeen merged commit 3e3cd67 into dotnet:main Jun 27, 2024
49 checks passed
@MartyIX MartyIX deleted the feature/2024-05-29-AccessibilityExtensions-perf branch June 27, 2024 15:15
mattleibow added a commit that referenced this pull request Jul 1, 2024
* Simplify Development.md (#23142)

* Simplify Development.md

* Update .github/DEVELOPMENT.md

Co-authored-by: Eilon Lipton <[email protected]>

* Update .github/DEVELOPMENT.md

Co-authored-by: Eilon Lipton <[email protected]>

* Update .github/DEVELOPMENT.md

Co-authored-by: Eilon Lipton <[email protected]>

* Update .github/DEVELOPMENT.md

Co-authored-by: Eilon Lipton <[email protected]>

* Update DEVELOPMENT.md

* - modify and move advanced tips to different file

* Update DEVELOPMENT.md

* Update .github/DEVELOPMENT.md

Co-authored-by: Gerald Versluis <[email protected]>

* Update docs/DevelopmentTips.md

Co-authored-by: Gerald Versluis <[email protected]>

* Update docs/DevelopmentTips.md

Co-authored-by: Gerald Versluis <[email protected]>

* - updates based on review

---------

Co-authored-by: Eilon Lipton <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>

* Wire RefreshView up to our xplat layout workflow (#23169) (#23218)

* Use better layout/measure path with refreshview

* - fix naming

* - set RefreshView content to maui compatible container

* - add test

* - fix null operator

* Update Issue23029.xaml.cs

* - fix content panel so it removes previous content

* - add additional check

* Remove adding to FutureAccessList as the app is running with runFullTrust capability (#23047)

* Call base.OnResume if Existing NavigationFragment Early (#23187)

* VSCode no longer uses MAUI to launch (#23222)

* [Android] Fix flyout behaviour switching exception (#22453)

* Fix flyout behaviour switching exception

* Tests added

* Flyout test page added

* Flyoutpage test fixes

* Flyout toggle test added

* Remove duplicate ] characters

* Flyout test pages added

* Check for platforms

* Fix title

* - fix tests

---------

Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: Shane Neuville <[email protected]>

* Renamed the project because macOS uses .app (#23223)

* Renamed the project because macOS uses .app

* And the folder

* merge first

* ns

* Move tests to new location (#23251)

* Split SingleProject targets (#23269)

* Split SingleProject targets

* Update Microsoft.Maui.Controls.SingleProject.Before.targets

* Update bug-report.yml with 8.0.61 (#23273)

* Null terminate Page on TabbedRenderer (#23290)

Co-authored-by: Shane Neuville <[email protected]>

* [Windows] Improve performance in accessibility extensions (#22698)

* AccessibilityExtensions: Add missing braces

* AccessibilityExtensions: Enable nullability and improve performance

* Update shipped & unshipped API

---------

Co-authored-by: Javier Suárez <[email protected]>

* [Android] Avoid double event subscribes in gesture manager (#23242)

* [Android] Avoid double event subscribes in gesture manager

* Fix typo in test text

* Bump Microsoft.Web.WebView2 from 1.0.2151.40 to 1.0.2592.51 (#23209)

* [tests] test a lot more things in `MemoryTests.cs` (#23324)

* [tests] test a lot more things in `MemoryTests.cs`

This expands the tests to cover more controls and areas.

* Add test cases for more controls:

  * `Ellipse`
  * `Grid`
  * `Path`
  * `Line`
  * `Path`
  * `RadioButton`
  * `Rectangle`
  * `RoundRectangle`

* Expand tests for a couple controls:

    * `Border` has a `StrokeShape`
    * Any `TemplatedView` gets a `ControlTemplate`

* Re-enable `ListView` for Android

This should work now after merging:

* dotnet/android#8900
* #23120

* Add a complicated test case for `BindableLayout`

Similar to the case at:

* #23199

* Skip `ListView` on API 23

* Bump Appium version to 2.11 (#23337)

* Bump Appium version to 2.11

* Update CarouselViewUITests.UpdateCurrentItem.cs

* Update appium-install.ps1

* Update CarouselViewUITests.UpdateCurrentItem.cs

* Simplify `NavigationRootManager.Connect` on the Windows platform. (#23345)

* Simplify `NavigationRootManager.Connect` on the Windows platform.

* Use ternary operator syntax

* Removed extra tabs

* Moved `_disconnected = false;` to `if (_disconnected)`

* Bump Appium Drivers (#23349)

* Fix Merge

---------

Co-authored-by: Eilon Lipton <[email protected]>
Co-authored-by: Gerald Versluis <[email protected]>
Co-authored-by: MartyIX <[email protected]>
Co-authored-by: Matthew Leibowitz <[email protected]>
Co-authored-by: Thomas Muller <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Javier Suárez <[email protected]>
Co-authored-by: Jonathan Dick <[email protected]>
Co-authored-by: Jonathan Peppers <[email protected]>
Co-authored-by: Takym (たかやま) <[email protected]>
@github-actions github-actions bot locked and limited conversation to collaborators Jul 28, 2024
@samhouts samhouts added fixed-in-8.0.70 fixed-in-net9.0-nightly This may be available in a nightly release! labels Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-core-platform Integration with platforms community ✨ Community Contribution fixed-in-8.0.70 fixed-in-net9.0-nightly This may be available in a nightly release! platform/windows 🪟 t/perf The issue affects performance (runtime speed, memory usage, startup time, etc.) (sub: perf)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants