-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Closed as duplicate
Description
In order to improve startup time, we could cache compiled delegates on disk. Technically this doesn't seem very complicated to do, with LambdaExpression.CompileToMethod(). This would make EF Core have some "AOT" characteristics in addition to the current "JIT" behavior.
Some questions that would need to be answered:
- How much startup time is really taken by query compilation - this may simply not be worth it
- This depends on Reflection.Emit, whose status in .NET Standard isn't clear (see https://github.com/dotnet/corefx/issues/29365). It seems like this could work by checking at runtime whether emit is supported or not, and bypass this in AOT environments (even though our support of AOT environments isn't ideal in any case).
- We'd have to decide when the query cache is persisted, how it's evicted (Improve query cache eviction #12905), how the user determines where it's stored, etc. etc.
This is conceptually similar to #1906, which is for caching the model.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels