You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Bryan Duxbury (JIRA)" <ji...@apache.org> on 2008/08/20 02:44:44 UTC

[jira] Commented: (THRIFT-115) Isset structure has a large memory footprint

    [ https://issues.apache.org/jira/browse/THRIFT-115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623856#action_12623856 ] 

Bryan Duxbury commented on THRIFT-115:
--------------------------------------

Here's a link with a little background: http://forums.sun.com/thread.jspa?threadID=635384&messageID=3698182

> Isset structure has a large memory footprint
> --------------------------------------------
>
>                 Key: THRIFT-115
>                 URL: https://issues.apache.org/jira/browse/THRIFT-115
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Priority: Minor
>
> My understanding is that in Java, booleans stored individually (that is, outside an array) take up the same space as an int in the host JVM. This means that they might take up to 4 bytes each! As a result, the Isset classes internal to generated structs consume a considerable quantity of memory.
> Boolean arrays in Java shrink each element to a byte, which would be an improvement. We could go even further and use a bit field and pack all the isset values into a few bytes. This could shave a considerable bit of the memory footprint.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.