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/11/20 21:48:44 UTC
[jira] Commented: (THRIFT-10) Descriptors used during serialization
should be immutable objects
[ https://issues.apache.org/jira/browse/THRIFT-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12649479#action_12649479 ]
Bryan Duxbury commented on THRIFT-10:
-------------------------------------
Should we pick up this issue again? It'd be a nice conceptual improvement and a tiny but measurable performance boost. We could also make the descriptor classes final to make them a little faster again.
> Descriptors used during serialization should be immutable objects
> -----------------------------------------------------------------
>
> Key: THRIFT-10
> URL: https://issues.apache.org/jira/browse/THRIFT-10
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Java)
> Reporter: Johan Stuyts
> Priority: Minor
> Attachments: ImmutableProtocolComponentDescriptors2.patch, SerializationBenchmarkMain.java
>
>
> The descriptors for structures, messages, types, etc. in package {{com.facebook.thrift.protocol}} which are used during (de-)serialization have mutable attributes. This forces the creation of these descriptors for each use even if the data is constant in many cases.
> By changing the descriptors to be immutable, structures and protocols can use singleton, constant instances during (de-)serialization. This will improve performance a bit by preventing the creation of hundreds (thousands?) of short-lived objects per second during heavy use of Thrift.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.