{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Routing/issues/238","labels_url":"https://api.github.com/repos/aspnet/Routing/issues/238/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Routing/issues/238/comments","events_url":"https://api.github.com/repos/aspnet/Routing/issues/238/events","html_url":"https://github.com/aspnet/Routing/pull/238","id":118701720,"number":238,"title":"Optimize RouteValueDictionary, expose concrete type","user":{"login":"rynowak","id":1430011,"avatar_url":"https://avatars.githubusercontent.com/u/1430011?v=3","gravatar_id":"","url":"https://api.github.com/users/rynowak","html_url":"https://github.com/rynowak","followers_url":"https://api.github.com/users/rynowak/followers","following_url":"https://api.github.com/users/rynowak/following{/other_user}","gists_url":"https://api.github.com/users/rynowak/gists{/gist_id}","starred_url":"https://api.github.com/users/rynowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rynowak/subscriptions","organizations_url":"https://api.github.com/users/rynowak/orgs","repos_url":"https://api.github.com/users/rynowak/repos","events_url":"https://api.github.com/users/rynowak/events{/privacy}","received_events_url":"https://api.github.com/users/rynowak/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/Routing/labels/cla-already-signed","name":"cla-already-signed","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-11-24T21:00:11Z","updated_at":"2015-11-25T01:20:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aspnet/Routing/pulls/238","html_url":"https://github.com/aspnet/Routing/pull/238","diff_url":"https://github.com/aspnet/Routing/pull/238.diff","patch_url":"https://github.com/aspnet/Routing/pull/238.patch"},"body":"This change optimizes allocations by RouteValueDictionary based on usage.\r\n\r\nFirst, implement a struct Enumerator, and expose the concrete RVD type\r\nfrom all extensibility points. We wanted to try and decouple this code\r\nfrom RVD originally and use IDictionary everywhere. After doing that we've\r\nfound that it allocates an unacceptable number of enumerators.\r\n\r\nSecondly, optimize copies of RVD for the case where you're copying an RVC\r\nto another (common case). When doing this we can copy the count to get the\r\nright capacity, and copy the entries without allocating an enumerator.\r\n\r\nLastly, optimize RVD for the case where it's a wrapper around a poco\r\nobject. We 'upgrade' to a writable full dictionary if you try to write to\r\nit, or call one of a number of APIs that are uncommonly used. We could\r\nproduce optimized versions of things like `Keys` and `CopyTo`."},"comment":{"url":"https://api.github.com/repos/aspnet/Routing/issues/comments/159455912","html_url":"https://github.com/aspnet/Routing/pull/238#issuecomment-159455912","issue_url":"https://api.github.com/repos/aspnet/Routing/issues/238","id":159455912,"user":{"login":"rynowak","id":1430011,"avatar_url":"https://avatars.githubusercontent.com/u/1430011?v=3","gravatar_id":"","url":"https://api.github.com/users/rynowak","html_url":"https://github.com/rynowak","followers_url":"https://api.github.com/users/rynowak/followers","following_url":"https://api.github.com/users/rynowak/following{/other_user}","gists_url":"https://api.github.com/users/rynowak/gists{/gist_id}","starred_url":"https://api.github.com/users/rynowak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rynowak/subscriptions","organizations_url":"https://api.github.com/users/rynowak/orgs","repos_url":"https://api.github.com/users/rynowak/repos","events_url":"https://api.github.com/users/rynowak/events{/privacy}","received_events_url":"https://api.github.com/users/rynowak/received_events","type":"User","site_admin":false},"created_at":"2015-11-25T01:20:49Z","updated_at":"2015-11-25T01:20:49Z","body":"updated"}}