{"action":"created","issue":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/6003","repository_url":"https://api.github.com/repos/influxdata/influxdb","labels_url":"https://api.github.com/repos/influxdata/influxdb/issues/6003/labels{/name}","comments_url":"https://api.github.com/repos/influxdata/influxdb/issues/6003/comments","events_url":"https://api.github.com/repos/influxdata/influxdb/issues/6003/events","html_url":"https://github.com/influxdata/influxdb/pull/6003","id":140711600,"number":6003,"title":"pre-allocate a buffer for HTTP writes","user":{"login":"joelegasse","id":1391698,"avatar_url":"https://avatars.githubusercontent.com/u/1391698?v=3","gravatar_id":"","url":"https://api.github.com/users/joelegasse","html_url":"https://github.com/joelegasse","followers_url":"https://api.github.com/users/joelegasse/followers","following_url":"https://api.github.com/users/joelegasse/following{/other_user}","gists_url":"https://api.github.com/users/joelegasse/gists{/gist_id}","starred_url":"https://api.github.com/users/joelegasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelegasse/subscriptions","organizations_url":"https://api.github.com/users/joelegasse/orgs","repos_url":"https://api.github.com/users/joelegasse/repos","events_url":"https://api.github.com/users/joelegasse/events{/privacy}","received_events_url":"https://api.github.com/users/joelegasse/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-14T15:42:26Z","updated_at":"2016-03-14T15:49:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/influxdata/influxdb/pulls/6003","html_url":"https://github.com/influxdata/influxdb/pull/6003","diff_url":"https://github.com/influxdata/influxdb/pull/6003.diff","patch_url":"https://github.com/influxdata/influxdb/pull/6003.patch"},"body":"A minor change to reduce some churn in the memory allocations during a write request. If we have a `Content-Length` header, we allocate a starting buffer of that size. For uncompressed payloads, it will be the only allocation that occurs to read the input. If we happen to have a `gzip`-ed payload, then the buffer will grow as needed."},"comment":{"url":"https://api.github.com/repos/influxdata/influxdb/issues/comments/196377982","html_url":"https://github.com/influxdata/influxdb/pull/6003#issuecomment-196377982","issue_url":"https://api.github.com/repos/influxdata/influxdb/issues/6003","id":196377982,"user":{"login":"joelegasse","id":1391698,"avatar_url":"https://avatars.githubusercontent.com/u/1391698?v=3","gravatar_id":"","url":"https://api.github.com/users/joelegasse","html_url":"https://github.com/joelegasse","followers_url":"https://api.github.com/users/joelegasse/followers","following_url":"https://api.github.com/users/joelegasse/following{/other_user}","gists_url":"https://api.github.com/users/joelegasse/gists{/gist_id}","starred_url":"https://api.github.com/users/joelegasse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelegasse/subscriptions","organizations_url":"https://api.github.com/users/joelegasse/orgs","repos_url":"https://api.github.com/users/joelegasse/repos","events_url":"https://api.github.com/users/joelegasse/events{/privacy}","received_events_url":"https://api.github.com/users/joelegasse/received_events","type":"User","site_admin":false},"created_at":"2016-03-14T15:49:36Z","updated_at":"2016-03-14T15:49:36Z","body":"It didn't change anything significantly as far as performance, but eliminated `bytes.makeSlice` as a source of allocations, and moved it to `serveWrite` with fewer than half the bytes that `bytes.makeSlice` had (since the buffer didn't have to grow when using `influx_stress`)"}}