You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Aki Sukegawa (JIRA)" <ji...@apache.org> on 2015/12/10 18:19:10 UTC

[jira] [Resolved] (THRIFT-3484) Consolidate temporary buffers in Java's TCompactProtocol

     [ https://issues.apache.org/jira/browse/THRIFT-3484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aki Sukegawa resolved THRIFT-3484.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.0

Committed, thanks Tom !

> Consolidate temporary buffers in Java's TCompactProtocol
> --------------------------------------------------------
>
>                 Key: THRIFT-3484
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3484
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>            Reporter: Tom Lee
>            Priority: Minor
>             Fix For: 1.0
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)