{"action":"created","comment":{"url":"https://api.github.com/repos/influxdata/influxdb/pulls/comments/80513806","id":80513806,"diff_hunk":"@@ -78,7 +87,7 @@ func (e *IntegerEncoder) Bytes() ([]byte, error) {\n \n func (e *IntegerEncoder) encodeRLE() ([]byte, error) {\n \t// Large varints can take up to 10 bytes\n-\tb := make([]byte, 1+10*3)\n+\tvar b [31]byte","path":"tsdb/engine/tsm1/int.go","position":25,"original_position":25,"commit_id":"d4081c826f34714ca28cb5f821504f3bc065cbdd","original_commit_id":"d4081c826f34714ca28cb5f821504f3bc065cbdd","user":{"login":"jwilder","id":219935,"avatar_url":"https://avatars.githubusercontent.com/u/219935?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilder","html_url":"https://github.com/jwilder","followers_url":"https://api.github.com/users/jwilder/followers","following_url":"https://api.github.com/users/jwilder/following{/other_user}","gists_url":"https://api.github.com/users/jwilder/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilder/subscriptions","organizations_url":"https://api.github.com/users/jwilder/orgs","repos_url":"https://api.github.com/users/jwilder/repos","events_url":"https://api.github.com/users/jwilder/events{/privacy}","received_events_url":"https://api.github.com/users/jwilder/received_events","type":"User","site_admin":false},"body":"Done.","created_at":"2016-09-26T16:20:58Z","updated_at":"2016-09-26T16:20:58Z","html_url":"https://github.com/influxdata/influxdb/pull/7348#discussion_r80513806","pull_request_url":"https://api.github.com/repos/influxdata/influxdb/pulls/7348","_links":{"self":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/comments/80513806"},"html":{"href":"https://github.com/influxdata/influxdb/pull/7348#discussion_r80513806"},"pull_request":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/7348"}}},"pull_request":{"url":"https://api.github.com/repos/influxdata/influxdb/pulls/7348","id":86435938,"html_url":"https://github.com/influxdata/influxdb/pull/7348","diff_url":"https://github.com/influxdata/influxdb/pull/7348.diff","patch_url":"https://github.com/influxdata/influxdb/pull/7348.patch","issue_url":"https://api.github.com/repos/influxdata/influxdb/issues/7348","number":7348,"state":"open","locked":false,"title":"Reduce allocations in write path/compactions","user":{"login":"jwilder","id":219935,"avatar_url":"https://avatars.githubusercontent.com/u/219935?v=3","gravatar_id":"","url":"https://api.github.com/users/jwilder","html_url":"https://github.com/jwilder","followers_url":"https://api.github.com/users/jwilder/followers","following_url":"https://api.github.com/users/jwilder/following{/other_user}","gists_url":"https://api.github.com/users/jwilder/gists{/gist_id}","starred_url":"https://api.github.com/users/jwilder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jwilder/subscriptions","organizations_url":"https://api.github.com/users/jwilder/orgs","repos_url":"https://api.github.com/users/jwilder/repos","events_url":"https://api.github.com/users/jwilder/events{/privacy}","received_events_url":"https://api.github.com/users/jwilder/received_events","type":"User","site_admin":false},"body":"###### Required for all non-trivial PRs\r\n- [x] Rebased/mergable\r\n- [x] Tests pass\r\n- [ ] CHANGELOG.md updated\r\n\r\nThis removes a bunch of allocations that occur during writes and compactions. \r\n\r\n* In the cache, the `store` and `entries` slices did not have capacity args so they were resized all the time.\r\n* Compactor created a bunch of byte slices for each decoded block, instead it now maintains it's own free list during the compactions.\r\n* Encoders were re-allocated during every block encoding, they are not maintained in a  long-lived pool and reused across compactions.\r\n* Parsing points grew the `[]Point` slice which causes more garbage.\r\n\r\ncc @joelegasse ","created_at":"2016-09-23T00:12:56Z","updated_at":"2016-09-26T16:20:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"538eb1a89eaabcb1df1d97c054f778f72ed884e9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/influxdata/influxdb/pulls/7348/commits","review_comments_url":"https://api.github.com/repos/influxdata/influxdb/pulls/7348/comments","review_comment_url":"https://api.github.com/repos/influxdata/influxdb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/influxdata/influxdb/issues/7348/comments","statuses_url":"https://api.github.com/repos/influxdata/influxdb/statuses/d4081c826f34714ca28cb5f821504f3bc065cbdd","head":{"label":"influxdata:jw-write-allocs","ref":"jw-write-allocs","sha":"d4081c826f34714ca28cb5f821504f3bc065cbdd","user":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"repo":{"id":13124802,"name":"influxdb","full_name":"influxdata/influxdb","owner":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdata/influxdb","description":"Scalable datastore for metrics, events, and real-time analytics","fork":false,"url":"https://api.github.com/repos/influxdata/influxdb","forks_url":"https://api.github.com/repos/influxdata/influxdb/forks","keys_url":"https://api.github.com/repos/influxdata/influxdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdata/influxdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdata/influxdb/teams","hooks_url":"https://api.github.com/repos/influxdata/influxdb/hooks","issue_events_url":"https://api.github.com/repos/influxdata/influxdb/issues/events{/number}","events_url":"https://api.github.com/repos/influxdata/influxdb/events","assignees_url":"https://api.github.com/repos/influxdata/influxdb/assignees{/user}","branches_url":"https://api.github.com/repos/influxdata/influxdb/branches{/branch}","tags_url":"https://api.github.com/repos/influxdata/influxdb/tags","blobs_url":"https://api.github.com/repos/influxdata/influxdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdata/influxdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdata/influxdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdata/influxdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdata/influxdb/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdata/influxdb/languages","stargazers_url":"https://api.github.com/repos/influxdata/influxdb/stargazers","contributors_url":"https://api.github.com/repos/influxdata/influxdb/contributors","subscribers_url":"https://api.github.com/repos/influxdata/influxdb/subscribers","subscription_url":"https://api.github.com/repos/influxdata/influxdb/subscription","commits_url":"https://api.github.com/repos/influxdata/influxdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdata/influxdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdata/influxdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdata/influxdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdata/influxdb/contents/{+path}","compare_url":"https://api.github.com/repos/influxdata/influxdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdata/influxdb/merges","archive_url":"https://api.github.com/repos/influxdata/influxdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdata/influxdb/downloads","issues_url":"https://api.github.com/repos/influxdata/influxdb/issues{/number}","pulls_url":"https://api.github.com/repos/influxdata/influxdb/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdata/influxdb/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdata/influxdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdata/influxdb/labels{/name}","releases_url":"https://api.github.com/repos/influxdata/influxdb/releases{/id}","deployments_url":"https://api.github.com/repos/influxdata/influxdb/deployments","created_at":"2013-09-26T14:31:10Z","updated_at":"2016-09-26T13:56:12Z","pushed_at":"2016-09-26T15:34:59Z","git_url":"git://github.com/influxdata/influxdb.git","ssh_url":"git@github.com:influxdata/influxdb.git","clone_url":"https://github.com/influxdata/influxdb.git","svn_url":"https://github.com/influxdata/influxdb","homepage":"https://influxdata.com","size":61772,"stargazers_count":8955,"watchers_count":8955,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1249,"mirror_url":null,"open_issues_count":421,"forks":1249,"open_issues":421,"watchers":8955,"default_branch":"master"}},"base":{"label":"influxdata:master","ref":"master","sha":"33ce9fd11c4a0d614770c3e12e069e6518c09be8","user":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"repo":{"id":13124802,"name":"influxdb","full_name":"influxdata/influxdb","owner":{"login":"influxdata","id":5713248,"avatar_url":"https://avatars.githubusercontent.com/u/5713248?v=3","gravatar_id":"","url":"https://api.github.com/users/influxdata","html_url":"https://github.com/influxdata","followers_url":"https://api.github.com/users/influxdata/followers","following_url":"https://api.github.com/users/influxdata/following{/other_user}","gists_url":"https://api.github.com/users/influxdata/gists{/gist_id}","starred_url":"https://api.github.com/users/influxdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/influxdata/subscriptions","organizations_url":"https://api.github.com/users/influxdata/orgs","repos_url":"https://api.github.com/users/influxdata/repos","events_url":"https://api.github.com/users/influxdata/events{/privacy}","received_events_url":"https://api.github.com/users/influxdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/influxdata/influxdb","description":"Scalable datastore for metrics, events, and real-time analytics","fork":false,"url":"https://api.github.com/repos/influxdata/influxdb","forks_url":"https://api.github.com/repos/influxdata/influxdb/forks","keys_url":"https://api.github.com/repos/influxdata/influxdb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/influxdata/influxdb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/influxdata/influxdb/teams","hooks_url":"https://api.github.com/repos/influxdata/influxdb/hooks","issue_events_url":"https://api.github.com/repos/influxdata/influxdb/issues/events{/number}","events_url":"https://api.github.com/repos/influxdata/influxdb/events","assignees_url":"https://api.github.com/repos/influxdata/influxdb/assignees{/user}","branches_url":"https://api.github.com/repos/influxdata/influxdb/branches{/branch}","tags_url":"https://api.github.com/repos/influxdata/influxdb/tags","blobs_url":"https://api.github.com/repos/influxdata/influxdb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/influxdata/influxdb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/influxdata/influxdb/git/refs{/sha}","trees_url":"https://api.github.com/repos/influxdata/influxdb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/influxdata/influxdb/statuses/{sha}","languages_url":"https://api.github.com/repos/influxdata/influxdb/languages","stargazers_url":"https://api.github.com/repos/influxdata/influxdb/stargazers","contributors_url":"https://api.github.com/repos/influxdata/influxdb/contributors","subscribers_url":"https://api.github.com/repos/influxdata/influxdb/subscribers","subscription_url":"https://api.github.com/repos/influxdata/influxdb/subscription","commits_url":"https://api.github.com/repos/influxdata/influxdb/commits{/sha}","git_commits_url":"https://api.github.com/repos/influxdata/influxdb/git/commits{/sha}","comments_url":"https://api.github.com/repos/influxdata/influxdb/comments{/number}","issue_comment_url":"https://api.github.com/repos/influxdata/influxdb/issues/comments{/number}","contents_url":"https://api.github.com/repos/influxdata/influxdb/contents/{+path}","compare_url":"https://api.github.com/repos/influxdata/influxdb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/influxdata/influxdb/merges","archive_url":"https://api.github.com/repos/influxdata/influxdb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/influxdata/influxdb/downloads","issues_url":"https://api.github.com/repos/influxdata/influxdb/issues{/number}","pulls_url":"https://api.github.com/repos/influxdata/influxdb/pulls{/number}","milestones_url":"https://api.github.com/repos/influxdata/influxdb/milestones{/number}","notifications_url":"https://api.github.com/repos/influxdata/influxdb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/influxdata/influxdb/labels{/name}","releases_url":"https://api.github.com/repos/influxdata/influxdb/releases{/id}","deployments_url":"https://api.github.com/repos/influxdata/influxdb/deployments","created_at":"2013-09-26T14:31:10Z","updated_at":"2016-09-26T13:56:12Z","pushed_at":"2016-09-26T15:34:59Z","git_url":"git://github.com/influxdata/influxdb.git","ssh_url":"git@github.com:influxdata/influxdb.git","clone_url":"https://github.com/influxdata/influxdb.git","svn_url":"https://github.com/influxdata/influxdb","homepage":"https://influxdata.com","size":61772,"stargazers_count":8955,"watchers_count":8955,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1249,"mirror_url":null,"open_issues_count":421,"forks":1249,"open_issues":421,"watchers":8955,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/7348"},"html":{"href":"https://github.com/influxdata/influxdb/pull/7348"},"issue":{"href":"https://api.github.com/repos/influxdata/influxdb/issues/7348"},"comments":{"href":"https://api.github.com/repos/influxdata/influxdb/issues/7348/comments"},"review_comments":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/7348/comments"},"review_comment":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/influxdata/influxdb/pulls/7348/commits"},"statuses":{"href":"https://api.github.com/repos/influxdata/influxdb/statuses/d4081c826f34714ca28cb5f821504f3bc065cbdd"}}}}
{"actor":{"display_login":"jwilder"}}