{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/22907","repository_url":"https://api.github.com/repos/elastic/elasticsearch","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22907/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22907/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22907/events","html_url":"https://github.com/elastic/elasticsearch/pull/22907","id":204625373,"number":22907,"title":"Do not create String instances in 'Strings' methods accepting StringBuilder","user":{"login":"sabi0","id":11509875,"avatar_url":"https://avatars.githubusercontent.com/u/11509875?v=3","gravatar_id":"","url":"https://api.github.com/users/sabi0","html_url":"https://github.com/sabi0","followers_url":"https://api.github.com/users/sabi0/followers","following_url":"https://api.github.com/users/sabi0/following{/other_user}","gists_url":"https://api.github.com/users/sabi0/gists{/gist_id}","starred_url":"https://api.github.com/users/sabi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabi0/subscriptions","organizations_url":"https://api.github.com/users/sabi0/orgs","repos_url":"https://api.github.com/users/sabi0/repos","events_url":"https://api.github.com/users/sabi0/events{/privacy}","received_events_url":"https://api.github.com/users/sabi0/received_events","type":"User","site_admin":false},"labels":[{"id":184103632,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Internal","name":":Internal","color":"009800","default":false},{"id":23174,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/enhancement","name":"enhancement","color":"4a4ea8","default":true},{"id":94283388,"url":"https://api.github.com/repos/elastic/elasticsearch/labels/review","name":"review","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-02-01T16:04:07Z","updated_at":"2017-02-23T17:10:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/22907","html_url":"https://github.com/elastic/elasticsearch/pull/22907","diff_url":"https://github.com/elastic/elasticsearch/pull/22907.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/22907.patch"},"body":"Imagine you are doing something like this:\r\n```java\r\nStringBuilder sb = new StringBuilder();\r\n// ... adding some heavy data to 'sb'\r\nsb.append(\"indices[\");\r\nStrings.arrayToDelimitedString(indices, \",\", sb);\r\nsb.append(\"], \");\r\nsb.append(\"types[\");\r\nStrings.arrayToDelimitedString(types, \",\", sb);\r\nsb.append(\"]\");\r\n```\r\n\r\nAnd before you know it, you've just allocated two extra 5 MB `String` instances on the heap."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/282056281","html_url":"https://github.com/elastic/elasticsearch/pull/22907#issuecomment-282056281","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/22907","id":282056281,"user":{"login":"sabi0","id":11509875,"avatar_url":"https://avatars.githubusercontent.com/u/11509875?v=3","gravatar_id":"","url":"https://api.github.com/users/sabi0","html_url":"https://github.com/sabi0","followers_url":"https://api.github.com/users/sabi0/followers","following_url":"https://api.github.com/users/sabi0/following{/other_user}","gists_url":"https://api.github.com/users/sabi0/gists{/gist_id}","starred_url":"https://api.github.com/users/sabi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sabi0/subscriptions","organizations_url":"https://api.github.com/users/sabi0/orgs","repos_url":"https://api.github.com/users/sabi0/repos","events_url":"https://api.github.com/users/sabi0/events{/privacy}","received_events_url":"https://api.github.com/users/sabi0/received_events","type":"User","site_admin":false},"created_at":"2017-02-23T17:10:34Z","updated_at":"2017-02-23T17:10:34Z","body":"If your CI is back to normal would you mind pulling this in?"}}
{"actor":{"display_login":"sabi0"}}