{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/comments/70564570","id":70564570,"diff_hunk":"@@ -0,0 +1,116 @@\n+using System;\n+using System.Runtime.ExceptionServices;\n+\n+namespace Microsoft.Extensions.DependencyInjection.ServiceLookup\n+{\n+    class CallSiteRuntimeResolver : CallSiteVisitor<ServiceProvider, object>","path":"src/Microsoft.Extensions.DependencyInjection/ServiceLookup/CallSiteRuntimeResolver.cs","position":6,"original_position":6,"commit_id":"1b447d6761a890fe6b3ae3fe08ff9e7631a0552e","original_commit_id":"1b447d6761a890fe6b3ae3fe08ff9e7631a0552e","user":{"login":"davidfowl","id":95136,"avatar_url":"https://avatars.githubusercontent.com/u/95136?v=3","gravatar_id":"","url":"https://api.github.com/users/davidfowl","html_url":"https://github.com/davidfowl","followers_url":"https://api.github.com/users/davidfowl/followers","following_url":"https://api.github.com/users/davidfowl/following{/other_user}","gists_url":"https://api.github.com/users/davidfowl/gists{/gist_id}","starred_url":"https://api.github.com/users/davidfowl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidfowl/subscriptions","organizations_url":"https://api.github.com/users/davidfowl/orgs","repos_url":"https://api.github.com/users/davidfowl/repos","events_url":"https://api.github.com/users/davidfowl/events{/privacy}","received_events_url":"https://api.github.com/users/davidfowl/received_events","type":"User","site_admin":false},"body":"nit: internal","created_at":"2016-07-13T05:01:09Z","updated_at":"2016-07-13T05:01:09Z","html_url":"https://github.com/aspnet/DependencyInjection/pull/429#discussion_r70564570","pull_request_url":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/429","_links":{"self":{"href":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/comments/70564570"},"html":{"href":"https://github.com/aspnet/DependencyInjection/pull/429#discussion_r70564570"},"pull_request":{"href":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/429"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/429","id":77210249,"html_url":"https://github.com/aspnet/DependencyInjection/pull/429","diff_url":"https://github.com/aspnet/DependencyInjection/pull/429.diff","patch_url":"https://github.com/aspnet/DependencyInjection/pull/429.patch","issue_url":"https://api.github.com/repos/aspnet/DependencyInjection/issues/429","number":429,"state":"open","locked":false,"title":"Optimize expression compilation memory usage","user":{"login":"pakrym","id":1697911,"avatar_url":"https://avatars.githubusercontent.com/u/1697911?v=3","gravatar_id":"","url":"https://api.github.com/users/pakrym","html_url":"https://github.com/pakrym","followers_url":"https://api.github.com/users/pakrym/followers","following_url":"https://api.github.com/users/pakrym/following{/other_user}","gists_url":"https://api.github.com/users/pakrym/gists{/gist_id}","starred_url":"https://api.github.com/users/pakrym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pakrym/subscriptions","organizations_url":"https://api.github.com/users/pakrym/orgs","repos_url":"https://api.github.com/users/pakrym/repos","events_url":"https://api.github.com/users/pakrym/events{/privacy}","received_events_url":"https://api.github.com/users/pakrym/received_events","type":"User","site_admin":false},"body":"Fixes: https://github.com/aspnet/DependencyInjection/issues/425 by caching private field access into local variables.\r\nAlso optimizes amount of `Monitor.Enter/Exit` and `try/catch` we do for scope services.\r\n\r\n## Test case:\r\nIdentitySample.Mvc project\r\nRun `net451` and request `/` multiple times to force all services to compile.\r\n\r\n## Before\r\n**234 MB** allocation from `Microsoft.Extensions.DependencyInjection.ServiceProvider+<>c__DisplayClass17_0.<RealizeService>b__1()`, **223 MB** because of CAS checks.\r\nAnd **2700ms** total compilation time.\r\n![http://i.imgur.com/mm7VunG.png](http://i.imgur.com/mm7VunG.png)\r\n\r\n## After\r\n**9.8 MB** allocation from `Microsoft.Extensions.DependencyInjection.ServiceProvider+<>c__DisplayClass17_0.<RealizeService>b__1()`, **4.3 MB** because of CAS checks.\r\nAnd **400ms** total compilation time.\r\n\r\n![http://i.imgur.com/pJkQSj5.png](http://i.imgur.com/pJkQSj5.png)\r\n\r\n@halter73 @davidfowl ","created_at":"2016-07-12T23:48:57Z","updated_at":"2016-07-13T05:01:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eae2e71e005c18a4034c59b9d79d656b2a1633f0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/429/commits","review_comments_url":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/429/comments","review_comment_url":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/DependencyInjection/issues/429/comments","statuses_url":"https://api.github.com/repos/aspnet/DependencyInjection/statuses/1b447d6761a890fe6b3ae3fe08ff9e7631a0552e","head":{"label":"aspnet:pakrym/expression-tree","ref":"pakrym/expression-tree","sha":"1b447d6761a890fe6b3ae3fe08ff9e7631a0552e","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":15814195,"name":"DependencyInjection","full_name":"aspnet/DependencyInjection","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/DependencyInjection","description":"Contains common DI abstractions that ASP.NET Core and Entity Framework Core use.","fork":false,"url":"https://api.github.com/repos/aspnet/DependencyInjection","forks_url":"https://api.github.com/repos/aspnet/DependencyInjection/forks","keys_url":"https://api.github.com/repos/aspnet/DependencyInjection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/DependencyInjection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/DependencyInjection/teams","hooks_url":"https://api.github.com/repos/aspnet/DependencyInjection/hooks","issue_events_url":"https://api.github.com/repos/aspnet/DependencyInjection/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/DependencyInjection/events","assignees_url":"https://api.github.com/repos/aspnet/DependencyInjection/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/DependencyInjection/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/DependencyInjection/tags","blobs_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/DependencyInjection/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/DependencyInjection/languages","stargazers_url":"https://api.github.com/repos/aspnet/DependencyInjection/stargazers","contributors_url":"https://api.github.com/repos/aspnet/DependencyInjection/contributors","subscribers_url":"https://api.github.com/repos/aspnet/DependencyInjection/subscribers","subscription_url":"https://api.github.com/repos/aspnet/DependencyInjection/subscription","commits_url":"https://api.github.com/repos/aspnet/DependencyInjection/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/DependencyInjection/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/DependencyInjection/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/DependencyInjection/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/DependencyInjection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/DependencyInjection/merges","archive_url":"https://api.github.com/repos/aspnet/DependencyInjection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/DependencyInjection/downloads","issues_url":"https://api.github.com/repos/aspnet/DependencyInjection/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/DependencyInjection/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/DependencyInjection/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/DependencyInjection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/DependencyInjection/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/DependencyInjection/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/DependencyInjection/deployments","created_at":"2014-01-11T00:58:01Z","updated_at":"2016-07-12T20:07:44Z","pushed_at":"2016-07-12T23:48:58Z","git_url":"git://github.com/aspnet/DependencyInjection.git","ssh_url":"git@github.com:aspnet/DependencyInjection.git","clone_url":"https://github.com/aspnet/DependencyInjection.git","svn_url":"https://github.com/aspnet/DependencyInjection","homepage":"","size":1701,"stargazers_count":371,"watchers_count":371,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":150,"mirror_url":null,"open_issues_count":27,"forks":150,"open_issues":27,"watchers":371,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"8cec9ac763bec5131beb12c20561bd13e0664d01","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"repo":{"id":15814195,"name":"DependencyInjection","full_name":"aspnet/DependencyInjection","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars.githubusercontent.com/u/6476660?v=3","gravatar_id":"","url":"https://api.github.com/users/aspnet","html_url":"https://github.com/aspnet","followers_url":"https://api.github.com/users/aspnet/followers","following_url":"https://api.github.com/users/aspnet/following{/other_user}","gists_url":"https://api.github.com/users/aspnet/gists{/gist_id}","starred_url":"https://api.github.com/users/aspnet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspnet/subscriptions","organizations_url":"https://api.github.com/users/aspnet/orgs","repos_url":"https://api.github.com/users/aspnet/repos","events_url":"https://api.github.com/users/aspnet/events{/privacy}","received_events_url":"https://api.github.com/users/aspnet/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aspnet/DependencyInjection","description":"Contains common DI abstractions that ASP.NET Core and Entity Framework Core use.","fork":false,"url":"https://api.github.com/repos/aspnet/DependencyInjection","forks_url":"https://api.github.com/repos/aspnet/DependencyInjection/forks","keys_url":"https://api.github.com/repos/aspnet/DependencyInjection/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/DependencyInjection/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/DependencyInjection/teams","hooks_url":"https://api.github.com/repos/aspnet/DependencyInjection/hooks","issue_events_url":"https://api.github.com/repos/aspnet/DependencyInjection/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/DependencyInjection/events","assignees_url":"https://api.github.com/repos/aspnet/DependencyInjection/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/DependencyInjection/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/DependencyInjection/tags","blobs_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/DependencyInjection/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/DependencyInjection/languages","stargazers_url":"https://api.github.com/repos/aspnet/DependencyInjection/stargazers","contributors_url":"https://api.github.com/repos/aspnet/DependencyInjection/contributors","subscribers_url":"https://api.github.com/repos/aspnet/DependencyInjection/subscribers","subscription_url":"https://api.github.com/repos/aspnet/DependencyInjection/subscription","commits_url":"https://api.github.com/repos/aspnet/DependencyInjection/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/DependencyInjection/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/DependencyInjection/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/DependencyInjection/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/DependencyInjection/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/DependencyInjection/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/DependencyInjection/merges","archive_url":"https://api.github.com/repos/aspnet/DependencyInjection/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/DependencyInjection/downloads","issues_url":"https://api.github.com/repos/aspnet/DependencyInjection/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/DependencyInjection/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/DependencyInjection/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/DependencyInjection/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/DependencyInjection/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/DependencyInjection/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/DependencyInjection/deployments","created_at":"2014-01-11T00:58:01Z","updated_at":"2016-07-12T20:07:44Z","pushed_at":"2016-07-12T23:48:58Z","git_url":"git://github.com/aspnet/DependencyInjection.git","ssh_url":"git@github.com:aspnet/DependencyInjection.git","clone_url":"https://github.com/aspnet/DependencyInjection.git","svn_url":"https://github.com/aspnet/DependencyInjection","homepage":"","size":1701,"stargazers_count":371,"watchers_count":371,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":150,"mirror_url":null,"open_issues_count":27,"forks":150,"open_issues":27,"watchers":371,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/429"},"html":{"href":"https://github.com/aspnet/DependencyInjection/pull/429"},"issue":{"href":"https://api.github.com/repos/aspnet/DependencyInjection/issues/429"},"comments":{"href":"https://api.github.com/repos/aspnet/DependencyInjection/issues/429/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/429/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/DependencyInjection/pulls/429/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/DependencyInjection/statuses/1b447d6761a890fe6b3ae3fe08ff9e7631a0552e"}}}}
{"actor":{"display_login":"davidfowl"}}