[
https://issues.apache.org/jira/browse/THRIFT-138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bryan Duxbury updated THRIFT-138:
---------------------------------
Attachment: thrift-138.patch
Here's a patch that implements a deep-copy constructor.
I created a small test with one of our structs that has several fields, but
only one string and one enum actually set. The serialization method was two
orders of magnitude slower than the copy constructor.
> Generated Thrift structs should have a deep-copy constructor
> ------------------------------------------------------------
>
> Key: THRIFT-138
> URL: https://issues.apache.org/jira/browse/THRIFT-138
> Project: Thrift
> Issue Type: New Feature
> Components: Compiler (Java)
> Reporter: Bryan Duxbury
> Priority: Minor
> Attachments: thrift-138.patch
>
>
> It'd be nice to be able to make a copy of a Thrift object by passing it as an
> argument to the constructor of the same object. Right now, we have to use a
> serialize/deserialize approach to making a deep object copy, and that seems
> really inefficient.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.