GitHub PullRequestReviewCommentEvent at 2014-09-15 17:30:40
Repository: docker
Actor: LK4D4
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/docker/docker/pulls/comments/17556113","id":17556113,"diff_hunk":"@@ -0,0 +1,125 @@\n+// DO NOT EDIT!\n+// Code generated by ffjson <https://github.com/pquerna/ffjson>\n+// source: pkg/jsonlog/jsonlog.go\n+// DO NOT EDIT!\n+\n+package jsonlog\n+\n+import (\n+\t\"bytes\"\n+\n+\t\"unicode/utf8\"\n+)\n+\n+func (mj *JSONLog) MarshalJSON() ([]byte, error) {\n+\tvar buf bytes.Buffer\n+\tbuf.Grow(1024)\n+\terr := mj.MarshalJSONBuf(&buf)\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\treturn buf.Bytes(), nil\n+}\n+func (mj *JSONLog) MarshalJSONBuf(buf *bytes.Buffer) error {","path":"pkg/jsonlog/jsonlog_ffjson.go","position":23,"original_position":23,"commit_id":"c30c27f10fb82d2f0460a0a4264816954167848c","original_commit_id":"c30c27f10fb82d2f0460a0a4264816954167848c","user":{"login":"LK4D4","id":101445,"avatar_url":"https://avatars.githubusercontent.com/u/101445?v=2","gravatar_id":"b76a8f4849829643862f7c5dd89cb11e","url":"https://api.github.com/users/LK4D4","html_url":"https://github.com/LK4D4","followers_url":"https://api.github.com/users/LK4D4/followers","following_url":"https://api.github.com/users/LK4D4/following{/other_user}","gists_url":"https://api.github.com/users/LK4D4/gists{/gist_id}","starred_url":"https://api.github.com/users/LK4D4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LK4D4/subscriptions","organizations_url":"https://api.github.com/users/LK4D4/orgs","repos_url":"https://api.github.com/users/LK4D4/repos","events_url":"https://api.github.com/users/LK4D4/events{/privacy}","received_events_url":"https://api.github.com/users/LK4D4/received_events","type":"User","site_admin":false},"body":"Am I right that we need change this on every code regeneration? Could you pls provide benchmark comparison with \"vanilla\" ffjson code and modified?","created_at":"2014-09-15T17:30:40Z","updated_at":"2014-09-15T17:30:40Z","html_url":"https://github.com/docker/docker/pull/8041#discussion_r17556113","pull_request_url":"https://api.github.com/repos/docker/docker/pulls/8041","_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/17556113"},"html":{"href":"https://github.com/docker/docker/pull/8041#discussion_r17556113"},"pull_request":{"href":"https://api.github.com/repos/docker/docker/pulls/8041"}}},"pull_request":{"url":"https://api.github.com/repos/docker/docker/pulls/8041","id":21244263,"html_url":"https://github.com/docker/docker/pull/8041","diff_url":"https://github.com/docker/docker/pull/8041.diff","patch_url":"https://github.com/docker/docker/pull/8041.patch","issue_url":"https://api.github.com/repos/docker/docker/issues/8041","number":8041,"state":"open","locked":false,"title":"lower the number of allocations in broadcastwriter","user":{"login":"unclejack","id":1409668,"avatar_url":"https://avatars.githubusercontent.com/u/1409668?v=2","gravatar_id":"65ef108d4bccc7105acad0aa85023c44","url":"https://api.github.com/users/unclejack","html_url":"https://github.com/unclejack","followers_url":"https://api.github.com/users/unclejack/followers","following_url":"https://api.github.com/users/unclejack/following{/other_user}","gists_url":"https://api.github.com/users/unclejack/gists{/gist_id}","starred_url":"https://api.github.com/users/unclejack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unclejack/subscriptions","organizations_url":"https://api.github.com/users/unclejack/orgs","repos_url":"https://api.github.com/users/unclejack/repos","events_url":"https://api.github.com/users/unclejack/events{/privacy}","received_events_url":"https://api.github.com/users/unclejack/received_events","type":"User","site_admin":false},"body":"This PR changes the JSONLog marshalling to use custom code for marshalling. This helps improve performance and to lower the amount of allocated memory.\r\n\r\n```\r\nbenchmark                    old ns/op     new ns/op     delta       \r\nBenchmarkBroadcastWriter     3274647       1165596       -64.41%     \r\n\r\nbenchmark                    old MB/s     new MB/s     speedup     \r\nBenchmarkBroadcastWriter     7.56         21.23        2.81x       \r\n\r\nbenchmark                    old allocs     new allocs     delta       \r\nBenchmarkBroadcastWriter     7550           2510           -66.75%     \r\n\r\nbenchmark                    old bytes     new bytes     delta       \r\nBenchmarkBroadcastWriter     590654        96739         -83.62%\r\n```\r\n\r\nFixes #3040\r\nFixes #7757","created_at":"2014-09-15T16:41:12Z","updated_at":"2014-09-15T17:30:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5c793b8d022b258d98a926e16f25ec6de5a12c2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/docker/docker/pulls/8041/commits","review_comments_url":"https://api.github.com/repos/docker/docker/pulls/8041/comments","review_comment_url":"https://api.github.com/repos/docker/docker/pulls/comments/{number}","comments_url":"https://api.github.com/repos/docker/docker/issues/8041/comments","statuses_url":"https://api.github.com/repos/docker/docker/statuses/c30c27f10fb82d2f0460a0a4264816954167848c","head":{"label":"unclejack:lower_allocations_broadcastwriter","ref":"lower_allocations_broadcastwriter","sha":"c30c27f10fb82d2f0460a0a4264816954167848c","user":{"login":"unclejack","id":1409668,"avatar_url":"https://avatars.githubusercontent.com/u/1409668?v=2","gravatar_id":"65ef108d4bccc7105acad0aa85023c44","url":"https://api.github.com/users/unclejack","html_url":"https://github.com/unclejack","followers_url":"https://api.github.com/users/unclejack/followers","following_url":"https://api.github.com/users/unclejack/following{/other_user}","gists_url":"https://api.github.com/users/unclejack/gists{/gist_id}","starred_url":"https://api.github.com/users/unclejack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unclejack/subscriptions","organizations_url":"https://api.github.com/users/unclejack/orgs","repos_url":"https://api.github.com/users/unclejack/repos","events_url":"https://api.github.com/users/unclejack/events{/privacy}","received_events_url":"https://api.github.com/users/unclejack/received_events","type":"User","site_admin":false},"repo":{"id":9157996,"name":"docker","full_name":"unclejack/docker","owner":{"login":"unclejack","id":1409668,"avatar_url":"https://avatars.githubusercontent.com/u/1409668?v=2","gravatar_id":"65ef108d4bccc7105acad0aa85023c44","url":"https://api.github.com/users/unclejack","html_url":"https://github.com/unclejack","followers_url":"https://api.github.com/users/unclejack/followers","following_url":"https://api.github.com/users/unclejack/following{/other_user}","gists_url":"https://api.github.com/users/unclejack/gists{/gist_id}","starred_url":"https://api.github.com/users/unclejack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/unclejack/subscriptions","organizations_url":"https://api.github.com/users/unclejack/orgs","repos_url":"https://api.github.com/users/unclejack/repos","events_url":"https://api.github.com/users/unclejack/events{/privacy}","received_events_url":"https://api.github.com/users/unclejack/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/unclejack/docker","description":"  Docker - the open-source application container engine","fork":true,"url":"https://api.github.com/repos/unclejack/docker","forks_url":"https://api.github.com/repos/unclejack/docker/forks","keys_url":"https://api.github.com/repos/unclejack/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/unclejack/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/unclejack/docker/teams","hooks_url":"https://api.github.com/repos/unclejack/docker/hooks","issue_events_url":"https://api.github.com/repos/unclejack/docker/issues/events{/number}","events_url":"https://api.github.com/repos/unclejack/docker/events","assignees_url":"https://api.github.com/repos/unclejack/docker/assignees{/user}","branches_url":"https://api.github.com/repos/unclejack/docker/branches{/branch}","tags_url":"https://api.github.com/repos/unclejack/docker/tags","blobs_url":"https://api.github.com/repos/unclejack/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/unclejack/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/unclejack/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/unclejack/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/unclejack/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/unclejack/docker/languages","stargazers_url":"https://api.github.com/repos/unclejack/docker/stargazers","contributors_url":"https://api.github.com/repos/unclejack/docker/contributors","subscribers_url":"https://api.github.com/repos/unclejack/docker/subscribers","subscription_url":"https://api.github.com/repos/unclejack/docker/subscription","commits_url":"https://api.github.com/repos/unclejack/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/unclejack/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/unclejack/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/unclejack/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/unclejack/docker/contents/{+path}","compare_url":"https://api.github.com/repos/unclejack/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/unclejack/docker/merges","archive_url":"https://api.github.com/repos/unclejack/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/unclejack/docker/downloads","issues_url":"https://api.github.com/repos/unclejack/docker/issues{/number}","pulls_url":"https://api.github.com/repos/unclejack/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/unclejack/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/unclejack/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/unclejack/docker/labels{/name}","releases_url":"https://api.github.com/repos/unclejack/docker/releases{/id}","created_at":"2013-04-01T23:05:05Z","updated_at":"2014-09-03T18:40:17Z","pushed_at":"2014-09-15T16:39:59Z","git_url":"git://github.com/unclejack/docker.git","ssh_url":"git@github.com:unclejack/docker.git","clone_url":"https://github.com/unclejack/docker.git","svn_url":"https://github.com/unclejack/docker","homepage":"http://www.docker.io","size":41605,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"docker:master","ref":"master","sha":"88a786d3c4475e7aa14c35e4ef02cf52e37b43df","user":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=2","gravatar_id":null,"url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"repo":{"id":7691631,"name":"docker","full_name":"docker/docker","owner":{"login":"docker","id":5429470,"avatar_url":"https://avatars.githubusercontent.com/u/5429470?v=2","gravatar_id":null,"url":"https://api.github.com/users/docker","html_url":"https://github.com/docker","followers_url":"https://api.github.com/users/docker/followers","following_url":"https://api.github.com/users/docker/following{/other_user}","gists_url":"https://api.github.com/users/docker/gists{/gist_id}","starred_url":"https://api.github.com/users/docker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/docker/subscriptions","organizations_url":"https://api.github.com/users/docker/orgs","repos_url":"https://api.github.com/users/docker/repos","events_url":"https://api.github.com/users/docker/events{/privacy}","received_events_url":"https://api.github.com/users/docker/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/docker/docker","description":"Docker - the open-source application container engine","fork":false,"url":"https://api.github.com/repos/docker/docker","forks_url":"https://api.github.com/repos/docker/docker/forks","keys_url":"https://api.github.com/repos/docker/docker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/docker/docker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/docker/docker/teams","hooks_url":"https://api.github.com/repos/docker/docker/hooks","issue_events_url":"https://api.github.com/repos/docker/docker/issues/events{/number}","events_url":"https://api.github.com/repos/docker/docker/events","assignees_url":"https://api.github.com/repos/docker/docker/assignees{/user}","branches_url":"https://api.github.com/repos/docker/docker/branches{/branch}","tags_url":"https://api.github.com/repos/docker/docker/tags","blobs_url":"https://api.github.com/repos/docker/docker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/docker/docker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/docker/docker/git/refs{/sha}","trees_url":"https://api.github.com/repos/docker/docker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/docker/docker/statuses/{sha}","languages_url":"https://api.github.com/repos/docker/docker/languages","stargazers_url":"https://api.github.com/repos/docker/docker/stargazers","contributors_url":"https://api.github.com/repos/docker/docker/contributors","subscribers_url":"https://api.github.com/repos/docker/docker/subscribers","subscription_url":"https://api.github.com/repos/docker/docker/subscription","commits_url":"https://api.github.com/repos/docker/docker/commits{/sha}","git_commits_url":"https://api.github.com/repos/docker/docker/git/commits{/sha}","comments_url":"https://api.github.com/repos/docker/docker/comments{/number}","issue_comment_url":"https://api.github.com/repos/docker/docker/issues/comments/{number}","contents_url":"https://api.github.com/repos/docker/docker/contents/{+path}","compare_url":"https://api.github.com/repos/docker/docker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/docker/docker/merges","archive_url":"https://api.github.com/repos/docker/docker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/docker/docker/downloads","issues_url":"https://api.github.com/repos/docker/docker/issues{/number}","pulls_url":"https://api.github.com/repos/docker/docker/pulls{/number}","milestones_url":"https://api.github.com/repos/docker/docker/milestones{/number}","notifications_url":"https://api.github.com/repos/docker/docker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/docker/docker/labels{/name}","releases_url":"https://api.github.com/repos/docker/docker/releases{/id}","created_at":"2013-01-18T18:10:57Z","updated_at":"2014-09-15T16:48:08Z","pushed_at":"2014-09-15T13:50:50Z","git_url":"git://github.com/docker/docker.git","ssh_url":"git@github.com:docker/docker.git","clone_url":"https://github.com/docker/docker.git","svn_url":"https://github.com/docker/docker","homepage":"http://www.docker.com","size":138405,"stargazers_count":15065,"watchers_count":15065,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2850,"mirror_url":null,"open_issues_count":804,"forks":2850,"open_issues":804,"watchers":15065,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/docker/docker/pulls/8041"},"html":{"href":"https://github.com/docker/docker/pull/8041"},"issue":{"href":"https://api.github.com/repos/docker/docker/issues/8041"},"comments":{"href":"https://api.github.com/repos/docker/docker/issues/8041/comments"},"review_comments":{"href":"https://api.github.com/repos/docker/docker/pulls/8041/comments"},"review_comment":{"href":"https://api.github.com/repos/docker/docker/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/docker/docker/pulls/8041/commits"},"statuses":{"href":"https://api.github.com/repos/docker/docker/statuses/c30c27f10fb82d2f0460a0a4264816954167848c"}}}}