[
https://issues.apache.org/jira/browse/THRIFT-110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12623902#action_12623902
]
David Reiss commented on THRIFT-110:
------------------------------------
We've talked about a new and more compact protocol before, so I like the idea
of not meddling with the existing TBinaryProtocol.
I'll reiterate that having a list<?> type that could contain two different
structures would be prohibitively expensive because you would have to include
the fully qualified type name with every single element. You would also have
to instantiate the structure by name which is impossible in C++ and expensive
in Java. I would recommend defining a union-like struct that contains one
field for each type that you would want in the list and creating a list of
those (all but one field of each would be empty).
> A more compact format
> ----------------------
>
> Key: THRIFT-110
> URL: https://issues.apache.org/jira/browse/THRIFT-110
> Project: Thrift
> Issue Type: Improvement
> Reporter: Noble Paul
>
> Thrift is not very compact in writing out data as (say protobuf) . It does
> not have the concept of variable length integers and various other
> optimizations possible . In Solr we use a lot of such optimizations to make a
> very compact payload. Thrift has a lot common with that format.
> It is all done in a single class
> http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/common/util/NamedListCodec.java?revision=685640&view=markup
> The other optimizations include writing type/value in same byte, very fast
> writes of Strings, externalizable strings etc
> We could use a thrift format for non-java clients and I would like to see it
> as compact as the current java version
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.