[ 
https://issues.apache.org/jira/browse/THRIFT-685?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryan Duxbury updated THRIFT-685:
---------------------------------

    Attachment: thrift-685.patch

Here's my initial effort. This produces a pretty noticeable speedup in 
deserialization time when using the compact protocol and TDeserializer. This 
patch notably does not yet address the binary protocol implementation.

I'd love some people to review it and give me feedback. Ideally, we'd commit 
what I have here as a starting point and then continue to improve other parts. 

> Direct buffer access to improve deserialization performance
> -----------------------------------------------------------
>
>                 Key: THRIFT-685
>                 URL: https://issues.apache.org/jira/browse/THRIFT-685
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Library (Java)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>            Priority: Minor
>             Fix For: 0.3
>
>         Attachments: thrift-685.patch
>
>
> After poking around a bit and comparing how Thrift performs versus Protocol 
> Buffers, I think we should change our transports and protocols to support 
> optional direct buffer access behavior. 
> Basically, the way this works is that if the transport is backed by a buffer, 
> then it can give access to that buffer to the protocol. The protocol can then 
> do things like read a byte without instantiating a new one-byte array or 
> decode a string without an intermediate byte[] copy. 
> In my initial testing, we can reduce the amount of time it takes to 
> deserialize a struct by at least 25%. There are probably further gains to be 
> had as well. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to