GitHub user ckolbeck opened a pull request:

    https://github.com/apache/kafka/pull/682

    Minor: Guard trace statements in the inner loop of the replica fetcher

    I'm not sure whether this warrants a ticket based on the contribution 
guidelines. If the maintainers feel it does, I'm happy to make one.
    
    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.
    
    I realize that the trace() call does its own guarding internally, however 
it's insufficient to prevent allocation of the thunk.
    
    This is my original work, and I license it to the Kafka project under the 
project's Apache license.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ckolbeck/kafka guard-trace-statements

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/682.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #682
    
----
commit 686d9a29bd5c2caa562769f2bf8431cedf4c75c1
Author: Cory Kolbeck <cory.kolb...@urbanairship.com>
Date:   2015-12-15T22:31:27Z

    Guard trace statements in the inner loop of the replica fetcher

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to