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 2010/04/02 19:12:27 UTC
[jira] Created: (THRIFT-751) Add clear() method to TBase
Add clear() method to TBase
---------------------------
Key: THRIFT-751
URL: https://issues.apache.org/jira/browse/THRIFT-751
Project: Thrift
Issue Type: New Feature
Components: Compiler (Java), Library (Java)
Affects Versions: 0.3
Reporter: Bryan Duxbury
Assignee: Bryan Duxbury
Priority: Minor
Fix For: 0.3
It'd be very handy to be able to quickly empty out a Thrift struct. This would allow one to reuse a Thrift struct reliably. In the Hadoop context, this would lead to a respectable performance benefit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (THRIFT-751) Add clear() method to TBase
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury closed THRIFT-751.
--------------------------------
Resolution: Fixed
I just committed this.
> Add clear() method to TBase
> ---------------------------
>
> Key: THRIFT-751
> URL: https://issues.apache.org/jira/browse/THRIFT-751
> Project: Thrift
> Issue Type: New Feature
> Components: Compiler (Java), Library (Java)
> Affects Versions: 0.3
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Minor
> Fix For: 0.4
>
> Attachments: thrift-751.patch
>
>
> It'd be very handy to be able to quickly empty out a Thrift struct. This would allow one to reuse a Thrift struct reliably. In the Hadoop context, this would lead to a respectable performance benefit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-751) Add clear() method to TBase
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-751:
---------------------------------
Patch Info: [Patch Available]
> Add clear() method to TBase
> ---------------------------
>
> Key: THRIFT-751
> URL: https://issues.apache.org/jira/browse/THRIFT-751
> Project: Thrift
> Issue Type: New Feature
> Components: Compiler (Java), Library (Java)
> Affects Versions: 0.3
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Minor
> Fix For: 0.4
>
> Attachments: thrift-751.patch
>
>
> It'd be very handy to be able to quickly empty out a Thrift struct. This would allow one to reuse a Thrift struct reliably. In the Hadoop context, this would lead to a respectable performance benefit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-751) Add clear() method to TBase
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-751:
---------------------------------
Attachment: thrift-751.patch
This adds a clear() method to the TBase interface and updates TUnion and the Java generator to supply implementations.
I did a quick microbenchmark to test performance of allocating new objects versus clearing one existing one, and found clearing to be about 5x as fast.
> Add clear() method to TBase
> ---------------------------
>
> Key: THRIFT-751
> URL: https://issues.apache.org/jira/browse/THRIFT-751
> Project: Thrift
> Issue Type: New Feature
> Components: Compiler (Java), Library (Java)
> Affects Versions: 0.3
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Minor
> Fix For: 0.4
>
> Attachments: thrift-751.patch
>
>
> It'd be very handy to be able to quickly empty out a Thrift struct. This would allow one to reuse a Thrift struct reliably. In the Hadoop context, this would lead to a respectable performance benefit.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.