{"action":"created","issue":{"url":"https://api.github.com/repos/apache/kafka/issues/682","labels_url":"https://api.github.com/repos/apache/kafka/issues/682/labels{/name}","comments_url":"https://api.github.com/repos/apache/kafka/issues/682/comments","events_url":"https://api.github.com/repos/apache/kafka/issues/682/events","html_url":"https://github.com/apache/kafka/pull/682","id":122395420,"number":682,"title":"Kafka-2992: Guard trace statements in the inner loop of the replica fetcher","user":{"login":"ckolbeck","id":225933,"avatar_url":"https://avatars.githubusercontent.com/u/225933?v=3","gravatar_id":"","url":"https://api.github.com/users/ckolbeck","html_url":"https://github.com/ckolbeck","followers_url":"https://api.github.com/users/ckolbeck/followers","following_url":"https://api.github.com/users/ckolbeck/following{/other_user}","gists_url":"https://api.github.com/users/ckolbeck/gists{/gist_id}","starred_url":"https://api.github.com/users/ckolbeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ckolbeck/subscriptions","organizations_url":"https://api.github.com/users/ckolbeck/orgs","repos_url":"https://api.github.com/users/ckolbeck/repos","events_url":"https://api.github.com/users/ckolbeck/events{/privacy}","received_events_url":"https://api.github.com/users/ckolbeck/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-15T23:52:00Z","updated_at":"2015-12-16T01:05:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/kafka/pulls/682","html_url":"https://github.com/apache/kafka/pull/682","diff_url":"https://github.com/apache/kafka/pull/682.diff","patch_url":"https://github.com/apache/kafka/pull/682.patch"},"body":"We're seeing some GC pause issues in production, and during our investigation found that the thunks created during invocation of three trace statements guarded in this PR were responsible for ~98% of all allocations by object count and ~90% by size. While I'm not sure that this was actually the cause of our issue, it seems prudent to avoid useless allocations in a tight loop.\r\n\r\nI realize that the trace() call does its own guarding internally, however it's insufficient to prevent allocation of the thunk.\r\n\r\nThis is my original work, and I license it to the Kafka project under the project's Apache license.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/kafka/issues/comments/164950592","html_url":"https://github.com/apache/kafka/pull/682#issuecomment-164950592","issue_url":"https://api.github.com/repos/apache/kafka/issues/682","id":164950592,"user":{"login":"gwenshap","id":1189030,"avatar_url":"https://avatars.githubusercontent.com/u/1189030?v=3","gravatar_id":"","url":"https://api.github.com/users/gwenshap","html_url":"https://github.com/gwenshap","followers_url":"https://api.github.com/users/gwenshap/followers","following_url":"https://api.github.com/users/gwenshap/following{/other_user}","gists_url":"https://api.github.com/users/gwenshap/gists{/gist_id}","starred_url":"https://api.github.com/users/gwenshap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwenshap/subscriptions","organizations_url":"https://api.github.com/users/gwenshap/orgs","repos_url":"https://api.github.com/users/gwenshap/repos","events_url":"https://api.github.com/users/gwenshap/events{/privacy}","received_events_url":"https://api.github.com/users/gwenshap/received_events","type":"User","site_admin":false},"created_at":"2015-12-16T01:05:04Z","updated_at":"2015-12-16T01:05:04Z","body":"LGTM"}}