GitHub user thomaslee opened a pull request:

    https://github.com/apache/thrift/pull/738

    THRIFT-3484 Consolidate temporary buffers in Java's TCompactProtocol

    TCompactProtocol allocates a number of small temporary buffers per-instance 
and, in some cases e.g. readDouble(), per-method-call. It's fairly trivial to 
consolidate these & save maybe 32 bytes of overhead per TCompactProtocol 
instance and possibly a bunch more for structs that contain lots of doubles.
    
    Seems like we can also avoid allocating empty ByteBuffers + byte[]s in 
readBinary() by returning singletons.

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

    $ git pull https://github.com/thomaslee/thrift tcompact_temp

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

    https://github.com/apache/thrift/pull/738.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 #738
    
----
commit 0c1ca80ad1c5c308126a55449a9185d285dc58f6
Author: Tom Lee <[email protected]>
Date:   2015-12-10T08:10:30Z

    THRIFT-3484 Consolidate temporary buffers in Java's TCompactProtocol

----


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to