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

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

If we do go with that approach, perhaps it is also time to remove several 
deprecated methods elsewhere, rather than have that pain hit in 1.6 or later as 
well.   I'm thinking mostly of other things on the Decoder side.   Perhaps we 
can look at the Decoder and Encoder side with more scrutiny and label it 
"stable" after this pass?

We're starting to be used in more frameworks, and once that happens API 
instability will be harder to manage.  Its not too bad for one application to 
switch, but when we're brought in via multiple third party paths it becomes a 
problem.

I'll post an alternate patch that rearranges the classes and changes the 
Factory to hide more abstraction (return the abstract parent type, not the 
implementation type, where possible).


> 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, AVRO-753.v2.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

        

Reply via email to