Don't unsubscribe/resubscribe the listener to the same INPC #384

Merged
merged 1 commit into from Sep 27, 2016

Conversation

Projects
None yet
6 participants
@hartez
Member

hartez commented Sep 27, 2016

Description of Change

BindingExpressionPart.Subscribe clears out the previous subscription before applying the new one, which is a relatively expensive operation. This change avoids clearing and resubscribing if the new handler is the same as the old one.

@StephaneDelcroix

This comment has been minimized.

Show comment
Hide comment
@StephaneDelcroix

StephaneDelcroix Sep 27, 2016

Member

I like this, but before merging it, I'd like to run it against my brand new perf test for SetValue and SetBinding, to see what's the real gain on Android (it probably doesn't matter on other plats).

Member

StephaneDelcroix commented Sep 27, 2016

I like this, but before merging it, I'd like to run it against my brand new perf test for SetValue and SetBinding, to see what's the real gain on Android (it probably doesn't matter on other plats).

@hartez

This comment has been minimized.

Show comment
Hide comment
@hartez

hartez Sep 27, 2016

Member

It definitely shows an improvement when I profile it in UWP; I'll be interested to hear how much of a difference it makes on Android.

Member

hartez commented Sep 27, 2016

It definitely shows an improvement when I profile it in UWP; I'll be interested to hear how much of a difference it makes on Android.

@jassmith jassmith merged commit f252238 into master Sep 27, 2016

4 of 5 checks passed

iOS10-UITests Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS10 : Canceled (Exit co…
Details
Android-UITests Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: UI Tests :: OSX Test Cloud Package - Run Android 6.0.1 : Tests passed: 346, ig…
Details
OSX-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: OSX Debug : Running
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: Windows Debug : Running
Details
iOS9-UITests Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle8 :: UI Tests :: OSX Test Cloud Package - Run iOS Unified iOS9 : Tests passed: 342,…
Details

@rmarinho rmarinho deleted the avoid-extra-unsubscribe branch Oct 7, 2016

@samhouts samhouts added this to the 2.3.4 milestone Jun 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment