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/08/02 19:17:17 UTC
[jira] Commented: (THRIFT-831) FramedTransport implementation that
reuses its buffers
[ https://issues.apache.org/jira/browse/THRIFT-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894606#action_12894606 ]
Bryan Duxbury commented on THRIFT-831:
--------------------------------------
Jeremy - could you possibly describe the nature of the tests that are failing in more detail so that I can try to reproduce the problem? The tests I have now seem to work, but that probably just means they're incomplete.
> FramedTransport implementation that reuses its buffers
> ------------------------------------------------------
>
> Key: THRIFT-831
> URL: https://issues.apache.org/jira/browse/THRIFT-831
> Project: Thrift
> Issue Type: New Feature
> Components: Library (Java)
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.4
>
> Attachments: thrift-831.patch
>
>
> The current version of TFramedTransport allocates new read and write buffers every time a frame is read or written. This is wasteful, leading to expensive byte[] allocations, soaking up cpu and GC time unnecessarily.
> It would be handy to have an implementation that automatically reuses existing buffers if they're big enough, and grows them as appropriate. My testing shows this to be as much as a 60% reduction in CPU cost in dealing with the transport.
> I think it's important for us to keep separate implementations available, since different applications might prefer to spend the CPU time to avoid having a big chunk of memory permanently allocated.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.