-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Optimize .NET Native directives #3561
Comments
@natemcmaster is this critical? It seems like things will become more fragile if we have a list of things we need (that will break all the time). If there is no major downside, then it seems like we should just leave it with everything. |
Not critical. I think we can consider this a |
Closing as this would just makes things more brittle. If we find a good reason to do it in the future then we can reconsider. |
More info to consider: adding EF.Sqlite RC1 to an empty UWP project increases the appx package (release mode w/ .net native) from 1 MB to about 56 MB, and increases compilation time from about 30 seconds to >5 minutes. |
WAT ❓ |
This is due to the excessive metadata included due to ImplyGen.cs. This was necesary to make query work in RC1. Hopefully our new approach for #3801 will fix this. |
Reopening as @natemcmaster needs to do a bit more analysis on how much unnecessary reflection metadata from the EF assemblies is contributing to the size of the binaries and the compilation time. We should have an automated test suite running on .NET Native to makes sure we are not missing any required reflection metadata. |
Yep... agreed that is a compelling reason to address this 😄 |
With changes in 9aab799, we've made significant improvement. Baseline: Blank UWP Project (default template): Baseline + added a reference to *Build time is the average of 3 build runs on a clean solution, excluding restore and deploy times |
Nice! 🎉 |
Closing now that we have addressed the compiler crashes and excessive metadata inclusion. See #4197. Optimizing further could make EF brittle as it can be hard to keep rdxml in sync with code. |
The current runtime directives in our library are not optimized. Runtime-metadata data is included for all EF types, most of which do not need to be reflection enabled. Optimizing the library to include only those types needing metadata will reduce compilation time and resulting .NET Native binary.
The text was updated successfully, but these errors were encountered: