Commit Graph

5 Commits

Author SHA1 Message Date
David Fowler 22423271c9 Make the RequestServicesContainerMiddleware thinner (#1360)
- Today the request services middleware is responsible for making sure there are request scoped services.
This PR tries introduces some breaking changes that are hopefully acceptable in order to gain some performance.
- Here are the assumptions this PR makes:
 - Since this middleware is first in the pipeline, the only thing that can
  set a default service provider would be the server itself. Since we have no servers that do that
  I removed that code that tries to noop if there's an existing service provider.
 - This PR no longer restores the previous service provider feature since it gets replaced every request
 anyways. Kestrel also clears out the feature on each request so it shouldn't be a problem (in theory).
 Once again, since this middleware is first, it is the last thing that runs before the server re-gains
 control on the way out so there's no need to restore anything.
 - We use the RegisterForDispose method to dispose of the IServiceProvider instead of doing it inline.
2018-03-21 02:19:25 -07:00
Ben Adams 2697ad9a37 Faster RequestServices (#941)
* Faster RequestServices
2017-02-14 08:37:38 -08:00
David Fowler b6a3fee088 Allocate the IServiceScopeFactory once and reuse it across requests
- Since we resolve the IServiceProvider from the application container, it's should be safe to reuse it across requests without the extra lookup everytime.
2016-04-01 20:32:59 -07:00
Doug Bunting bb3809d3dc React to HttpAbstractions change: No features in `.Internal` namespace
- see issue aspnet/HttpAbstractions#561 and pull aspnet/HttpAbstractions#589
2016-03-21 09:06:37 -07:00
Christian Weiss cc0fc6ac06 File names not matching class names 2016-03-20 12:06:46 +01:00