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] Subscribe less pointer events in UpdatingGestureRecognizers #22781

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

MartyIX
Copy link
Collaborator

@MartyIX MartyIX commented Jun 1, 2024

Description of Change

The idea of the PR is simple. There two sets of pointer event subscriptions:

_container.PointerEntered += OnPgrPointerEntered;
_container.PointerExited += OnPgrPointerExited;
_container.PointerMoved += OnPgrPointerMoved;
_container.PointerPressed += OnPgrPointerPressed;
_container.PointerReleased += OnPgrPointerReleased;

and

_container.PointerPressed += OnPointerPressed;
_container.PointerExited += OnPointerExited;
_container.PointerReleased += OnPointerReleased;
_container.PointerCanceled += OnPointerCanceled;

Consequently, _container.PointerPressed, _container.PointerExited, and _container.PointerReleased are subscribed twice. And this PR removes these subscriptions.

Performance impact

image

-> ~25% improvement

Issues Fixed

Contributes to #21787

@MartyIX MartyIX requested a review from a team as a code owner June 1, 2024 20:45
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jun 1, 2024
Copy link
Contributor

Hey there @MartyIX! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@MartyIX MartyIX requested review from Foda and removed request for tj-devel709 June 2, 2024 08:59
@jsuarezruiz
Copy link
Contributor

/azp run

Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@Foda Foda merged commit 4a3bc31 into dotnet:main Jun 5, 2024
49 checks passed
@MartyIX MartyIX deleted the feature/2024-06-01-WinUI-pointers-perf branch June 5, 2024 22:29
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants