{"action":"created","issue":{"url":"https://api.github.com/repos/gdamore/mangos/issues/123","labels_url":"https://api.github.com/repos/gdamore/mangos/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/gdamore/mangos/issues/123/comments","events_url":"https://api.github.com/repos/gdamore/mangos/issues/123/events","html_url":"https://github.com/gdamore/mangos/pull/123","id":67283693,"number":123,"title":"Use Message pool on Send to reduce allocations","user":{"login":"tylertreat","id":552817,"avatar_url":"https://avatars.githubusercontent.com/u/552817?v=3","gravatar_id":"","url":"https://api.github.com/users/tylertreat","html_url":"https://github.com/tylertreat","followers_url":"https://api.github.com/users/tylertreat/followers","following_url":"https://api.github.com/users/tylertreat/following{/other_user}","gists_url":"https://api.github.com/users/tylertreat/gists{/gist_id}","starred_url":"https://api.github.com/users/tylertreat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylertreat/subscriptions","organizations_url":"https://api.github.com/users/tylertreat/orgs","repos_url":"https://api.github.com/users/tylertreat/repos","events_url":"https://api.github.com/users/tylertreat/events{/privacy}","received_events_url":"https://api.github.com/users/tylertreat/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-09T05:24:28Z","updated_at":"2015-04-09T13:59:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/gdamore/mangos/pulls/123","html_url":"https://github.com/gdamore/mangos/pull/123","diff_url":"https://github.com/gdamore/mangos/pull/123.diff","patch_url":"https://github.com/gdamore/mangos/pull/123.patch"},"body":"In a tight loop, `Send` causes a lot of allocations. Using the `Message` pool helps reduce this. Now the only place `Message` is allocated is in `NewMessage`."},"comment":{"url":"https://api.github.com/repos/gdamore/mangos/issues/comments/91239862","html_url":"https://github.com/gdamore/mangos/pull/123#issuecomment-91239862","issue_url":"https://api.github.com/repos/gdamore/mangos/issues/123","id":91239862,"user":{"login":"gdamore","id":1295229,"avatar_url":"https://avatars.githubusercontent.com/u/1295229?v=3","gravatar_id":"","url":"https://api.github.com/users/gdamore","html_url":"https://github.com/gdamore","followers_url":"https://api.github.com/users/gdamore/followers","following_url":"https://api.github.com/users/gdamore/following{/other_user}","gists_url":"https://api.github.com/users/gdamore/gists{/gist_id}","starred_url":"https://api.github.com/users/gdamore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdamore/subscriptions","organizations_url":"https://api.github.com/users/gdamore/orgs","repos_url":"https://api.github.com/users/gdamore/repos","events_url":"https://api.github.com/users/gdamore/events{/privacy}","received_events_url":"https://api.github.com/users/gdamore/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T13:59:17Z","updated_at":"2015-04-09T13:59:17Z","body":"Actually looking at this again, you can reduce pressure on the heap even further.  Since we're just going to replace the body, instead of using len(b), just use 0."}}