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

Don't use reflection at runtime #24903

Open
4 of 5 tasks
Tracked by #22952 ...
AndriySvyryd opened this issue May 13, 2021 · 2 comments
Open
4 of 5 tasks
Tracked by #22952 ...

Don't use reflection at runtime #24903

AndriySvyryd opened this issue May 13, 2021 · 2 comments
Labels
area-aot area-global area-perf composite-issue A grouping of multiple related issues into one issue type-enhancement
Milestone

Comments

@AndriySvyryd
Copy link
Member

AndriySvyryd commented May 13, 2021

This is a grouping of related issues. Feel free to vote (👍) for this issue to indicate that this is an area that you think we should spend time on, but consider also voting for individual issues for things you consider especially important.


The code that currently uses reflection and expression compilation at runtime can be precompiled:

This would allow to remove all reflection data from the compiled model (e.g. IReadOnlyTypeBase.ClrType, IReadOnlyPropertyBase.PropertyInfo) and significantly improve AOT experience.

@Noemata
Copy link

Noemata commented May 31, 2021

@AndriySvyryd , totally agree. I'd be interesting in helping with this if there was a commitment to support UWP from the get go.

@hez2010
Copy link
Contributor

hez2010 commented Aug 14, 2021

efcore is using assembly loading which is incompatible with NativeAOT:

assembly = Assembly.Load(new AssemblyName("SQLitePCLRaw.batteries_v2"));

Though it can be mitigated by calling SQLitePCL.Batteries_V2.Init() manually before efcore context setup (thanks to the try-catch block).

@AndriySvyryd AndriySvyryd changed the title Don't use dynamic code at runtime Don't use reflection at runtime Sep 7, 2021
@AndriySvyryd AndriySvyryd modified the milestones: Backlog, Epics Oct 19, 2022
@ajcvickers ajcvickers added the composite-issue A grouping of multiple related issues into one issue label Dec 6, 2022
@ajcvickers ajcvickers modified the milestones: Epics, Backlog Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-aot area-global area-perf composite-issue A grouping of multiple related issues into one issue type-enhancement
Projects
None yet
Development

No branches or pull requests

4 participants