[ https://issues.apache.org/jira/browse/THRIFT-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13950914#comment-13950914 ]
Chris Stylianou commented on THRIFT-2429: ----------------------------------------- Hi Randy, thanks for your response. I understand the issues raised and agree with them for a default scenario. I think it would be acceptable however to have a thrift compiler option to generate code that does not send default values. The developer would have to understand and accept that this is an optimisation to reduce serialization/network bandwidth and that it could lead to undefined behaviour for default values on old clients. The developer would have to take on the responsibility to ensure default value alterations are managed accordingly. Our current issue is that we have rather large (40-50 fields) thrift structures being sent as lists (~1 million in size) across our interface, where a large percentage of the fields are populated with default values. By not sending these default values, we foresee a massive speed increase. (We are currently using the TCompactProtocol/TBufferedTransportFactory combination). > Provide option to not write default values, rely on receiver default > construction instead > ----------------------------------------------------------------------------------------- > > Key: THRIFT-2429 > URL: https://issues.apache.org/jira/browse/THRIFT-2429 > Project: Thrift > Issue Type: Improvement > Components: C++ - Compiler > Affects Versions: 0.9.1 > Reporter: Chris Stylianou > Labels: thrift > > Would there be any objections to a patch that does not write default values > (essentially the same logic as the optional attributes). This obviously > relies on the receiving application using the same IDL version to ensure the > defaults used on object construction match the senders. -- This message was sent by Atlassian JIRA (v6.2#6252)