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

Replacing the Reflection with Source Generators? #27543

Closed
HakamFostok opened this issue Mar 2, 2022 · 3 comments
Closed

Replacing the Reflection with Source Generators? #27543

HakamFostok opened this issue Mar 2, 2022 · 3 comments

Comments

@HakamFostok
Copy link

@stephentoub has shown great uses cases of source generators in .NET 7 to improve the performance dramatically.

https://www.youtube.com/watch?v=rwfNDyBBgks

My question: Is there any plans to use Source Generators in EF to improve the performance?
And if there is any, When?

Just a wild idea, imagine that LINQ Query on DbContext generates ADO.NET code of the SQL Query and map it to the class (at compile time without reflection)

Would not that be great for the performance of EF, even maybe surpass the performance of Dapper?

I searched the issues before opening this one, and I found nothing,

Sorry if there is an already opened issue for this

Thank you all

@roji
Copy link
Member

roji commented Mar 2, 2022

Duplicate of #25009

@roji roji marked this as a duplicate of #24903 Mar 2, 2022
@roji roji marked this as a duplicate of #25009 Mar 2, 2022
@roji roji marked this as not a duplicate of #24903 Mar 2, 2022
@roji
Copy link
Member

roji commented Mar 2, 2022

See also #27156. This wouldn't use source generators, but rather design-time (as opposed to built-time) source generation with Roslyn.

@HakamFostok
Copy link
Author

Thank you, this will be great and hopefully, we will see it in the product as soon as possible
Thank you for all the efforts you do to make EF better

@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants