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

Update ServiceDescriptorExtensions.cs #553

Closed
wants to merge 2 commits into from

Conversation

twenzel
Copy link
Contributor

@twenzel twenzel commented Oct 5, 2020

  • Improve performance due to less reflection
  • Prevent runtime errors when renaming RegistrationAdapter.FromServiceDescriptor method

- Improve performance due to less reflection
- Prevent runtime errors when renaming RegistrationAdapter.FromServiceDescriptor method
@ltines
Copy link
Contributor

ltines commented Oct 5, 2020

Nice @twenzel. Thanks

@robertcoltheart
Copy link
Contributor

Why not just use a generic type registration? I've raised #555 to consider instead of this.

@jonorossi jonorossi added this to the v5.1.0 milestone Oct 6, 2020
@generik0
Copy link
Contributor

generik0 commented Oct 7, 2020

Hi @jonorossi i agree with this change

@jonorossi
Copy link
Member

@generik0 you've commented both here and on #555 that you agree with the change, isn't it one or the other?

@generik0
Copy link
Contributor

generik0 commented Oct 7, 2020

@jonorossi i did not see changes on #555 and #553 to be mutually exclusive, but I see now that they are. Thanks for pointing this out to me!

@twenzel @robertcoltheart thoughs to which PR is best performance-wise? I would think #555 has most potential?

@robertcoltheart
Copy link
Contributor

I mean, reflection is always going to be slow. I haven't benchmarked either change to see which is faster though.

@generik0
Copy link
Contributor

generik0 commented Oct 7, 2020

@twenzel @robertcoltheart I think we should remove reflections. But that is just an opinion. Maybe you guys can decide?

@jonorossi
Copy link
Member

Closing as we'll go with #555 which puts the implementation in line with FromOpenGenericServiceDescriptor. Thanks for the PR @twenzel.

@jonorossi jonorossi closed this Oct 8, 2020
@twenzel twenzel deleted the patch-1 branch October 8, 2020 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants