avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Carey (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AVRO-753) Java: Improve BinaryEncoder Performance
Date Mon, 07 Feb 2011 18:59:59 GMT

    [ https://issues.apache.org/jira/browse/AVRO-753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991514#comment-12991514
] 

Scott Carey commented on AVRO-753:
----------------------------------

Nope. I'm just losing a bit of my mind.  Decoder and Encoder are both abstract classes.  OutputStream
too.  So the only related option is making Encoder extend OutputStream, but I'm not sure that
is a good idea, since not all encoders encode to a byte stream.  Making Encoder an interface
would hurt performance.   BinaryDecoder's inputStream() method was made due to the same reasoning.

> Java:  Improve BinaryEncoder Performance
> ----------------------------------------
>
>                 Key: AVRO-753
>                 URL: https://issues.apache.org/jira/browse/AVRO-753
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Scott Carey
>            Assignee: Scott Carey
>             Fix For: 1.5.0
>
>         Attachments: AVRO-753.v1.patch
>
>
> BinaryEncoder has not had a performance improvement pass like BinaryDecoder did.  It
still mostly writes directly to the underlying OutputStream which is not optimal for performance.
 I like to use a rule that if you are writing to an OutputStream or reading from an InputStream
in chunks smaller than 128 bytes, you have a performance problem.
> Measurements indicate that optimizing BinaryEncoder yields a 2.5x to 6x performance improvement.
 The process is significantly simpler than BinaryDecoder because 'pushing' is easier than
'pulling' -- and also because we do not need a 'direct' variant because BinaryEncoder already
buffers sometimes.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message