[
https://issues.apache.org/jira/browse/THRIFT-754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853275#action_12853275
]
Mathias Herberts commented on THRIFT-754:
-----------------------------------------
I'm never too comfortable knowing there's a while(true) loop whose exit clause
could potentially never become true due to either corrupted data or malicious
input. Am I being too paranoid on this one?
> Improvements to varint reading in Compact Protocol
> --------------------------------------------------
>
> Key: THRIFT-754
> URL: https://issues.apache.org/jira/browse/THRIFT-754
> Project: Thrift
> Issue Type: Improvement
> Components: Library (Java)
> Affects Versions: 0.3
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Fix For: 0.3
>
> Attachments: thrift-754.patch
>
>
> I've found a way to make better use of direct buffer access in the Compact
> Protocol that makes reading varints faster. When there's at least 5 or 10
> bytes available in the buffer, we can try to do the whole varint
> deserialization from the buffer rather than byte by byte, and ultimately only
> consume the bytes we used. This lets us avoid the cost of going back and
> forth from the buffer 1-10 times.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.