aspnet / DependencyInjection

[Archived] Contains common DI abstractions that ASP.NET Core and Entity Framework Core use. Project moved to https://github.com/aspnet/Extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate improving DI container runtime codegen

davidfowl opened this issue · comments

We want to see if we can improve the performance of our DI container by looking at a few different things:

  • Reducing locks when resolving singletons/scoped services
  • Improving accessing fields of the closure passed into the compiled lambda expression. Today each access is an array access. It can be a field access (see https://github.com/dadhi/FastExpressionCompiler)

We also want to look at adding the ability to pre-compile the DI container to avoid any runtime cost at all. This is obviously tricky for things like open generics but we can fallback to a runtime implementation where possible.

/cc @pakrym

@davidfowl

We also want to look at adding the ability to pre-compile the DI container to avoid any runtime cost at all.

I had a probably related question.

@davidfowl, I also want to see improvements in areas meantioned. But do you have any data that these improvements are important? What area is more important than other?

This issue was moved to dotnet/aspnetcore#2338