{"action":"closed","issue":{"url":"https://api.github.com/repos/segmentio/analytics-go/issues/72","repository_url":"https://api.github.com/repos/segmentio/analytics-go","labels_url":"https://api.github.com/repos/segmentio/analytics-go/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/segmentio/analytics-go/issues/72/comments","events_url":"https://api.github.com/repos/segmentio/analytics-go/issues/72/events","html_url":"https://github.com/segmentio/analytics-go/issues/72","id":150438477,"number":72,"title":"Client blocks for the duration of the batch marshal and post (including retries)","user":{"login":"paddie","id":427074,"avatar_url":"https://avatars.githubusercontent.com/u/427074?v=3","gravatar_id":"","url":"https://api.github.com/users/paddie","html_url":"https://github.com/paddie","followers_url":"https://api.github.com/users/paddie/followers","following_url":"https://api.github.com/users/paddie/following{/other_user}","gists_url":"https://api.github.com/users/paddie/gists{/gist_id}","starred_url":"https://api.github.com/users/paddie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paddie/subscriptions","organizations_url":"https://api.github.com/users/paddie/orgs","repos_url":"https://api.github.com/users/paddie/repos","events_url":"https://api.github.com/users/paddie/events{/privacy}","received_events_url":"https://api.github.com/users/paddie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/segmentio/analytics-go/milestones/1","html_url":"https://github.com/segmentio/analytics-go/milestones/v3","labels_url":"https://api.github.com/repos/segmentio/analytics-go/milestones/1/labels","id":1721502,"number":1,"title":"v3","description":null,"creator":{"login":"achille-roussel","id":865510,"avatar_url":"https://avatars.githubusercontent.com/u/865510?v=3","gravatar_id":"","url":"https://api.github.com/users/achille-roussel","html_url":"https://github.com/achille-roussel","followers_url":"https://api.github.com/users/achille-roussel/followers","following_url":"https://api.github.com/users/achille-roussel/following{/other_user}","gists_url":"https://api.github.com/users/achille-roussel/gists{/gist_id}","starred_url":"https://api.github.com/users/achille-roussel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achille-roussel/subscriptions","organizations_url":"https://api.github.com/users/achille-roussel/orgs","repos_url":"https://api.github.com/users/achille-roussel/repos","events_url":"https://api.github.com/users/achille-roussel/events{/privacy}","received_events_url":"https://api.github.com/users/achille-roussel/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":24,"state":"open","created_at":"2016-04-20T20:54:32Z","updated_at":"2016-04-25T17:46:42Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-04-22T18:19:22Z","updated_at":"2016-04-25T17:46:42Z","closed_at":"2016-04-25T17:46:42Z","body":"When the loop receives a message and `len(msgs) == c.size` the list of messages are marshalled into json and sent. When doing this, the client will accept messages up until the buffer channel buffer size, and the block. Worst case, this will be: \r\n```\r\njsonMarshalTime + 10 * http-roundtrip + ExponentialRetries\r\n```\r\n\r\nThis could be a potentially long time (in CPU terms), all the while the client would be unresponsive or just blocking other calls to client.Track etc.\r\n\r\nSince whatever errors or complications happened during the send does not really result in anything but a call to log, it might make sense to do this completely async/concurrently."}}