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

Hudson commented on THRIFT-1188:
--------------------------------

FAILURE: Integrated in Thrift #1237 (See 
[https://builds.apache.org/job/Thrift/1237/])
THRIFT-1188 C++: Use bit fields for a more compact __isset struct (roger: rev 
3c494114b16d2873ebd6f28297d3ae91843b065f)
* compiler/cpp/src/generate/t_cpp_generator.cc


> C++: Use bit fields for a more compact __isset struct
> -----------------------------------------------------
>
>                 Key: THRIFT-1188
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1188
>             Project: Thrift
>          Issue Type: New Feature
>          Components: C++ - Compiler
>    Affects Versions: 0.6.1, 0.7
>            Reporter: Eric Rannaud
>            Assignee: Roger Meier
>             Fix For: 0.9.2
>
>         Attachments: thrift-cpp-isset-bitfield.patch
>
>
> With the C++ generator, the __isset structure is made of bool fields.
> For Thrift objects with many optional fields, the memory impact of the 
> __isset structure with respect to the actual data payload can be significant.
> This patch simply turns each member of __isset into a 1-bit field.
> This patch does not pack the structure as I'm not sure how this should be 
> handled in general. As is, it will depend on the compiler whether there is a 
> real size gain (with GCC 4.5 the struct is packed at all optimization levels).
> To enforce packing in all cases, should I define a T_ATTRIBUTE_PACKED macro 
> in Thrift.h? That wouldn't work for compilers that use #pragma, however.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to