maui icon indicating copy to clipboard operation
maui copied to clipboard

[WinUI] Cache gesture event subscriptions

Open MartyIX opened this issue 2 years ago • 9 comments

Description of Change

Interops operations on Windows are costly. This PR avoids unsubscribing events that were not subscribed in the first place and thus improving performance.

Speedscope

image

-> 70% improvement for that particular method.

I test with my complex grid sample basically.

Issues Fixed

Contributes to #21787

MartyIX avatar Apr 20 '24 17:04 MartyIX

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.

@jonathanpeppers would you mind taking a look please?

MartyIX avatar Apr 22 '24 15:04 MartyIX

Measurements with commit a5f8d56fb2fe4b820a41de4b01bcd3e91c6d591f addressing https://github.com/dotnet/maui/pull/21959#discussion_r1575352239 by adding SubscriptionFlags

image

MartyIX avatar Apr 23 '24 08:04 MartyIX

/azp run

jonathanpeppers avatar Apr 23 '24 13:04 jonathanpeppers

Azure Pipelines successfully started running 3 pipeline(s).

azure-pipelines[bot] avatar Apr 23 '24 13:04 azure-pipelines[bot]

@rmarinho Could you take a look please?

MartyIX avatar Apr 24 '24 15:04 MartyIX

@jfversluis Could you take a look please?

MartyIX avatar Apr 26 '24 12:04 MartyIX

@Foda might be the right person here

jfversluis avatar May 01 '24 19:05 jfversluis

@Foda Could you take a look please?

MartyIX avatar May 03 '24 13:05 MartyIX

@rmarinho Is it good to be merged or does it need to wait until SR6?

MartyIX avatar May 09 '24 06:05 MartyIX

@rmarinho Anything else to do here?

MartyIX avatar May 14 '24 13:05 MartyIX