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

[XamlC] Allow compilation of IValueProviders #622

Merged
merged 2 commits into from Dec 14, 2016

Conversation

Projects
None yet
3 participants
@StephaneDelcroix
Member

StephaneDelcroix commented Dec 8, 2016

Description of Change

IValueProviders tagged with the appropriate attribute will be bypassed
and the compiled version, if found, will be used.

This first version contains a compiled version of Setter's
IValueProvider and it already reduces the amount of generated IL by 39%
in, e.g. StyleTests.

It's a huge gain because XamlC no longer have to generate
ServiceProviders for those, so the methodbody is smaller, takes less
time to jit, less time to execute and nothing is invoked at runtime,
which probably saves a tons of time as well, as most IValueProvider
implementation heavily uses reflection.

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard
  • Consolidate commits as makes sense

@dnfclas dnfclas added the cla-required label Dec 8, 2016

@StephaneDelcroix StephaneDelcroix referenced this pull request Dec 9, 2016

Merged

Xamlc compiled trigger #629

3 of 4 tasks complete

StephaneDelcroix added some commits Dec 8, 2016

[XamlC] Allow compilation of IValueProviders
`IValueProvider`s tagged with the appropriate attribute will be bypassed
and the compiled version, if found, will be used.

This first version contains a compiled version of Setter's
IValueProvider and it already reduces the amount of generated IL by 39%
in, e.g. StyleTests.

It's a huge gain because XamlC no longer have to generate
ServiceProviders for those, so the methodbody is smaller, takes less
time to jit, less time to execute and nothing is invoked at runtime,
which probably saves a tons of time as well, as most IValueProvider
implementation heavily uses reflection.

@StephaneDelcroix StephaneDelcroix merged commit d4792dc into master Dec 14, 2016

1 of 2 checks passed

OSX-Debug-C8 Started TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: OSX Debug
Details
Windows-Debug-C8 Finished TeamCity Build Xamarin.Forms :: Debug :: Cycle 8 :: Windows Debug : Tests passed: 3685, ignored: 10
Details

@StephaneDelcroix StephaneDelcroix deleted the xamlc_compiledValueProvider branch Dec 14, 2016

jonathanpeppers pushed a commit to Hitcents/Xamarin.Forms that referenced this pull request Feb 1, 2017

[XamlC] Allow compilation of IValueProviders (#622)
* [XamlC] Allow compilation of IValueProviders

`IValueProvider`s tagged with the appropriate attribute will be bypassed
and the compiled version, if found, will be used.

This first version contains a compiled version of Setter's
IValueProvider and it already reduces the amount of generated IL by 39%
in, e.g. StyleTests.

It's a huge gain because XamlC no longer have to generate
ServiceProviders for those, so the methodbody is smaller, takes less
time to jit, less time to execute and nothing is invoked at runtime,
which probably saves a tons of time as well, as most IValueProvider
implementation heavily uses reflection.

* name bool parameters

@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