{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4133","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4133/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4133/comments","events_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4133/events","html_url":"https://github.com/aspnet/EntityFramework/issues/4133","id":123008869,"number":4133,"title":"Perf: EF's usage of DI possibly causing significant overhead on context per request scenarios","user":{"login":"divega","id":1253414,"avatar_url":"https://avatars.githubusercontent.com/u/1253414?v=3","gravatar_id":"","url":"https://api.github.com/users/divega","html_url":"https://github.com/divega","followers_url":"https://api.github.com/users/divega/followers","following_url":"https://api.github.com/users/divega/following{/other_user}","gists_url":"https://api.github.com/users/divega/gists{/gist_id}","starred_url":"https://api.github.com/users/divega/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/divega/subscriptions","organizations_url":"https://api.github.com/users/divega/orgs","repos_url":"https://api.github.com/users/divega/repos","events_url":"https://api.github.com/users/divega/events{/privacy}","received_events_url":"https://api.github.com/users/divega/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/EntityFramework/labels/perf","name":"perf","color":"fef2c0"},{"url":"https://api.github.com/repos/aspnet/EntityFramework/labels/pri0","name":"pri0","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/18","html_url":"https://github.com/aspnet/EntityFramework/milestones/7.0.0-rc2","labels_url":"https://api.github.com/repos/aspnet/EntityFramework/milestones/18/labels","id":1403248,"number":18,"title":"7.0.0-rc2","description":null,"creator":{"login":"bricelam","id":1226749,"avatar_url":"https://avatars.githubusercontent.com/u/1226749?v=3","gravatar_id":"","url":"https://api.github.com/users/bricelam","html_url":"https://github.com/bricelam","followers_url":"https://api.github.com/users/bricelam/followers","following_url":"https://api.github.com/users/bricelam/following{/other_user}","gists_url":"https://api.github.com/users/bricelam/gists{/gist_id}","starred_url":"https://api.github.com/users/bricelam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bricelam/subscriptions","organizations_url":"https://api.github.com/users/bricelam/orgs","repos_url":"https://api.github.com/users/bricelam/repos","events_url":"https://api.github.com/users/bricelam/events{/privacy}","received_events_url":"https://api.github.com/users/bricelam/received_events","type":"User","site_admin":false},"open_issues":55,"closed_issues":124,"state":"open","created_at":"2015-11-09T22:23:36Z","updated_at":"2016-01-20T21:28:36Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-12-18T19:12:11Z","updated_at":"2016-01-20T22:27:13Z","closed_at":null,"body":"@DamianEdwards detected significant overhead on `GetService<T>()` calls while profiling controllers that use EF in [ASP.NET Benchmarks](https://github.com/aspnet/benchmarks). \r\n\r\nInitial investigation seems to indicate that one of the patterns we use in our service collection builder extensions with scoped services may prevent DI from leveraging its caching, e.g.:\r\n\r\n``` C#\r\nbuilder.GetInfrastructure() \r\n    .TryAdd(new ServiceCollection() \r\n...\r\n    .AddScoped(p => GetProviderServices(p).ParameterNameGeneratorFactory)\r\n``` \r\n\r\ncc @halter73 @ajcvickers @lodejard \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aspnet/EntityFramework/issues/comments/173382196","html_url":"https://github.com/aspnet/EntityFramework/issues/4133#issuecomment-173382196","issue_url":"https://api.github.com/repos/aspnet/EntityFramework/issues/4133","id":173382196,"user":{"login":"anpete","id":1210944,"avatar_url":"https://avatars.githubusercontent.com/u/1210944?v=3","gravatar_id":"","url":"https://api.github.com/users/anpete","html_url":"https://github.com/anpete","followers_url":"https://api.github.com/users/anpete/followers","following_url":"https://api.github.com/users/anpete/following{/other_user}","gists_url":"https://api.github.com/users/anpete/gists{/gist_id}","starred_url":"https://api.github.com/users/anpete/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anpete/subscriptions","organizations_url":"https://api.github.com/users/anpete/orgs","repos_url":"https://api.github.com/users/anpete/repos","events_url":"https://api.github.com/users/anpete/events{/privacy}","received_events_url":"https://api.github.com/users/anpete/received_events","type":"User","site_admin":false},"created_at":"2016-01-20T22:27:13Z","updated_at":"2016-01-20T22:27:13Z","body":"@divega I've addressed the low-hanging fruit :-) "}}