{"action":"created","comment":{"url":"https://api.github.com/repos/aspnet/SignalR/pulls/comments/180956595","pull_request_review_id":111469890,"id":180956595,"diff_hunk":"@@ -0,0 +1,65 @@\n+using System;\n+using System.Diagnostics;\n+using System.Runtime.InteropServices;\n+using MessagePack;\n+\n+namespace Microsoft.AspNetCore.SignalR.Redis.Internal\n+{\n+    internal static class MsgPackUtil\n+    {\n+        public static int ReadArrayHeader(ref ReadOnlyMemory<byte> data)\n+        {\n+            var arr = GetArray(in data);\n+            var val = MessagePackBinary.ReadArrayHeader(arr.Array, arr.Offset, out var readSize);\n+            data = data.Slice(readSize);\n+            return val;\n+        }\n+\n+        public static int ReadMapHeader(ref ReadOnlyMemory<byte> data)\n+        {\n+            var arr = GetArray(in data);\n+            var val = MessagePackBinary.ReadMapHeader(arr.Array, arr.Offset, out var readSize);\n+            data = data.Slice(readSize);\n+            return val;\n+        }\n+\n+        public static string ReadString(ref ReadOnlyMemory<byte> data)\n+        {\n+            var arr = GetArray(in data);\n+            var val = MessagePackBinary.ReadString(arr.Array, arr.Offset, out var readSize);\n+            data = data.Slice(readSize);\n+            return val;\n+        }\n+\n+        public static byte[] ReadBytes(ref ReadOnlyMemory<byte> data)\n+        {\n+            var arr = GetArray(in data);\n+            var val = MessagePackBinary.ReadBytes(arr.Array, arr.Offset, out var readSize);\n+            data = data.Slice(readSize);\n+            return val;\n+        }\n+\n+        public static int ReadInt32(ref ReadOnlyMemory<byte> data)\n+        {\n+            var arr = GetArray(in data);\n+            var val = MessagePackBinary.ReadInt32(arr.Array, arr.Offset, out var readSize);\n+            data = data.Slice(readSize);\n+            return val;\n+        }\n+\n+        public static byte ReadByte(ref ReadOnlyMemory<byte> data)","path":"src/Microsoft.AspNetCore.SignalR.Redis/Internal/MsgPackUtil.cs","position":50,"original_position":50,"commit_id":"e6060caa9d4f740777c163a9e8cfc8fb1354da63","original_commit_id":"e6060caa9d4f740777c163a9e8cfc8fb1354da63","user":{"login":"davidfowl","id":95136,"avatar_url":"https://avatars3.githubusercontent.com/u/95136?v=4","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":"This cant be efficient","created_at":"2018-04-12T03:33:04Z","updated_at":"2018-04-12T03:33:04Z","html_url":"https://github.com/aspnet/SignalR/pull/1968#discussion_r180956595","pull_request_url":"https://api.github.com/repos/aspnet/SignalR/pulls/1968","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/comments/180956595"},"html":{"href":"https://github.com/aspnet/SignalR/pull/1968#discussion_r180956595"},"pull_request":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/1968"}}},"pull_request":{"url":"https://api.github.com/repos/aspnet/SignalR/pulls/1968","id":181074324,"html_url":"https://github.com/aspnet/SignalR/pull/1968","diff_url":"https://github.com/aspnet/SignalR/pull/1968.diff","patch_url":"https://github.com/aspnet/SignalR/pull/1968.patch","issue_url":"https://api.github.com/repos/aspnet/SignalR/issues/1968","number":1968,"state":"open","locked":false,"title":"fix #1914 by switching RedisProtocol to MsgPack","user":{"login":"anurse","id":7574,"avatar_url":"https://avatars3.githubusercontent.com/u/7574?v=4","gravatar_id":"","url":"https://api.github.com/users/anurse","html_url":"https://github.com/anurse","followers_url":"https://api.github.com/users/anurse/followers","following_url":"https://api.github.com/users/anurse/following{/other_user}","gists_url":"https://api.github.com/users/anurse/gists{/gist_id}","starred_url":"https://api.github.com/users/anurse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anurse/subscriptions","organizations_url":"https://api.github.com/users/anurse/orgs","repos_url":"https://api.github.com/users/anurse/repos","events_url":"https://api.github.com/users/anurse/events{/privacy}","received_events_url":"https://api.github.com/users/anurse/received_events","type":"User","site_admin":false},"body":"Fixes #1914.\r\n\r\nTo make this work, I had to move the code to serialize a `SerializeHubMessage` into the Redis assembly (otherwise the core would have to reference MessagePack-CSharp). I think that's actually cleaner anyway, as it's the only place that needs to serialize/deserialize these.\r\n\r\nThat also means `SerializeHubMessage` gained a constructor that takes an `IEnumerable<SerializedMessage>` and `SerializedMessage` went from private-nested to pubternal. Both reasonable changes I think, since other lifetime managers will need to construct `SerializedHubMessage` from serialized messages.","created_at":"2018-04-12T02:23:19Z","updated_at":"2018-04-12T03:33:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a9217f9dadf238375506ffc07b47bfffc167bab","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mikaelm12","id":4809660,"avatar_url":"https://avatars1.githubusercontent.com/u/4809660?v=4","gravatar_id":"","url":"https://api.github.com/users/mikaelm12","html_url":"https://github.com/mikaelm12","followers_url":"https://api.github.com/users/mikaelm12/followers","following_url":"https://api.github.com/users/mikaelm12/following{/other_user}","gists_url":"https://api.github.com/users/mikaelm12/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelm12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelm12/subscriptions","organizations_url":"https://api.github.com/users/mikaelm12/orgs","repos_url":"https://api.github.com/users/mikaelm12/repos","events_url":"https://api.github.com/users/mikaelm12/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelm12/received_events","type":"User","site_admin":false},{"login":"BrennanConroy","id":7574801,"avatar_url":"https://avatars0.githubusercontent.com/u/7574801?v=4","gravatar_id":"","url":"https://api.github.com/users/BrennanConroy","html_url":"https://github.com/BrennanConroy","followers_url":"https://api.github.com/users/BrennanConroy/followers","following_url":"https://api.github.com/users/BrennanConroy/following{/other_user}","gists_url":"https://api.github.com/users/BrennanConroy/gists{/gist_id}","starred_url":"https://api.github.com/users/BrennanConroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrennanConroy/subscriptions","organizations_url":"https://api.github.com/users/BrennanConroy/orgs","repos_url":"https://api.github.com/users/BrennanConroy/repos","events_url":"https://api.github.com/users/BrennanConroy/events{/privacy}","received_events_url":"https://api.github.com/users/BrennanConroy/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aspnet/SignalR/pulls/1968/commits","review_comments_url":"https://api.github.com/repos/aspnet/SignalR/pulls/1968/comments","review_comment_url":"https://api.github.com/repos/aspnet/SignalR/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aspnet/SignalR/issues/1968/comments","statuses_url":"https://api.github.com/repos/aspnet/SignalR/statuses/e6060caa9d4f740777c163a9e8cfc8fb1354da63","head":{"label":"aspnet:anurse/1914-redis-msgpack","ref":"anurse/1914-redis-msgpack","sha":"e6060caa9d4f740777c163a9e8cfc8fb1354da63","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","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":71159589,"name":"SignalR","full_name":"aspnet/SignalR","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","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/SignalR","description":"Incredibly simple real-time web for ASP.NET Core","fork":false,"url":"https://api.github.com/repos/aspnet/SignalR","forks_url":"https://api.github.com/repos/aspnet/SignalR/forks","keys_url":"https://api.github.com/repos/aspnet/SignalR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/SignalR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/SignalR/teams","hooks_url":"https://api.github.com/repos/aspnet/SignalR/hooks","issue_events_url":"https://api.github.com/repos/aspnet/SignalR/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/SignalR/events","assignees_url":"https://api.github.com/repos/aspnet/SignalR/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/SignalR/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/SignalR/tags","blobs_url":"https://api.github.com/repos/aspnet/SignalR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/SignalR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/SignalR/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/SignalR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/SignalR/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/SignalR/languages","stargazers_url":"https://api.github.com/repos/aspnet/SignalR/stargazers","contributors_url":"https://api.github.com/repos/aspnet/SignalR/contributors","subscribers_url":"https://api.github.com/repos/aspnet/SignalR/subscribers","subscription_url":"https://api.github.com/repos/aspnet/SignalR/subscription","commits_url":"https://api.github.com/repos/aspnet/SignalR/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/SignalR/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/SignalR/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/SignalR/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/SignalR/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/SignalR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/SignalR/merges","archive_url":"https://api.github.com/repos/aspnet/SignalR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/SignalR/downloads","issues_url":"https://api.github.com/repos/aspnet/SignalR/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/SignalR/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/SignalR/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/SignalR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/SignalR/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/SignalR/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/SignalR/deployments","created_at":"2016-10-17T16:39:15Z","updated_at":"2018-04-12T03:29:21Z","pushed_at":"2018-04-12T03:29:18Z","git_url":"git://github.com/aspnet/SignalR.git","ssh_url":"git@github.com:aspnet/SignalR.git","clone_url":"https://github.com/aspnet/SignalR.git","svn_url":"https://github.com/aspnet/SignalR","homepage":null,"size":8566,"stargazers_count":1646,"watchers_count":1646,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":277,"mirror_url":null,"archived":false,"open_issues_count":91,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":277,"open_issues":91,"watchers":1646,"default_branch":"dev"}},"base":{"label":"aspnet:dev","ref":"dev","sha":"08f9990c39f822f81cdd5b04e41379fc9242fada","user":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","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":71159589,"name":"SignalR","full_name":"aspnet/SignalR","owner":{"login":"aspnet","id":6476660,"avatar_url":"https://avatars3.githubusercontent.com/u/6476660?v=4","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/SignalR","description":"Incredibly simple real-time web for ASP.NET Core","fork":false,"url":"https://api.github.com/repos/aspnet/SignalR","forks_url":"https://api.github.com/repos/aspnet/SignalR/forks","keys_url":"https://api.github.com/repos/aspnet/SignalR/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspnet/SignalR/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspnet/SignalR/teams","hooks_url":"https://api.github.com/repos/aspnet/SignalR/hooks","issue_events_url":"https://api.github.com/repos/aspnet/SignalR/issues/events{/number}","events_url":"https://api.github.com/repos/aspnet/SignalR/events","assignees_url":"https://api.github.com/repos/aspnet/SignalR/assignees{/user}","branches_url":"https://api.github.com/repos/aspnet/SignalR/branches{/branch}","tags_url":"https://api.github.com/repos/aspnet/SignalR/tags","blobs_url":"https://api.github.com/repos/aspnet/SignalR/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspnet/SignalR/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspnet/SignalR/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspnet/SignalR/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspnet/SignalR/statuses/{sha}","languages_url":"https://api.github.com/repos/aspnet/SignalR/languages","stargazers_url":"https://api.github.com/repos/aspnet/SignalR/stargazers","contributors_url":"https://api.github.com/repos/aspnet/SignalR/contributors","subscribers_url":"https://api.github.com/repos/aspnet/SignalR/subscribers","subscription_url":"https://api.github.com/repos/aspnet/SignalR/subscription","commits_url":"https://api.github.com/repos/aspnet/SignalR/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspnet/SignalR/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspnet/SignalR/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspnet/SignalR/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspnet/SignalR/contents/{+path}","compare_url":"https://api.github.com/repos/aspnet/SignalR/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspnet/SignalR/merges","archive_url":"https://api.github.com/repos/aspnet/SignalR/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspnet/SignalR/downloads","issues_url":"https://api.github.com/repos/aspnet/SignalR/issues{/number}","pulls_url":"https://api.github.com/repos/aspnet/SignalR/pulls{/number}","milestones_url":"https://api.github.com/repos/aspnet/SignalR/milestones{/number}","notifications_url":"https://api.github.com/repos/aspnet/SignalR/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspnet/SignalR/labels{/name}","releases_url":"https://api.github.com/repos/aspnet/SignalR/releases{/id}","deployments_url":"https://api.github.com/repos/aspnet/SignalR/deployments","created_at":"2016-10-17T16:39:15Z","updated_at":"2018-04-12T03:29:21Z","pushed_at":"2018-04-12T03:29:18Z","git_url":"git://github.com/aspnet/SignalR.git","ssh_url":"git@github.com:aspnet/SignalR.git","clone_url":"https://github.com/aspnet/SignalR.git","svn_url":"https://github.com/aspnet/SignalR","homepage":null,"size":8566,"stargazers_count":1646,"watchers_count":1646,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":277,"mirror_url":null,"archived":false,"open_issues_count":91,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":277,"open_issues":91,"watchers":1646,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/1968"},"html":{"href":"https://github.com/aspnet/SignalR/pull/1968"},"issue":{"href":"https://api.github.com/repos/aspnet/SignalR/issues/1968"},"comments":{"href":"https://api.github.com/repos/aspnet/SignalR/issues/1968/comments"},"review_comments":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/1968/comments"},"review_comment":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aspnet/SignalR/pulls/1968/commits"},"statuses":{"href":"https://api.github.com/repos/aspnet/SignalR/statuses/e6060caa9d4f740777c163a9e8cfc8fb1354da63"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"davidfowl"}}