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

Christophe Le Saec commented on AVRO-3643:
------------------------------------------

I add this PR to improve a few the resolveUnion method for GenericData class 
(In same time, i put logic of having several Conversion in an external class, 
in order to simplify GenericData class).

[~JavaPerformance] : Could you run your profiling tools on this version and see 
if there any visible improvement ?

> GenericDatumWriter Potential Performance improvement
> ----------------------------------------------------
>
>                 Key: AVRO-3643
>                 URL: https://issues.apache.org/jira/browse/AVRO-3643
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.11.1
>            Reporter: Paul Anderson
>            Priority: Minor
>         Attachments: image-2022-10-18-17-38-44-273.png
>
>
> Sorry for the seemingly naïve nature of this observation, however whilst 
> trying to resolve a Kafka client performance issue on Mainframe I noticed a 
> potential opportunity in Avro serialisation. I am using a compiled Avro 
> schema and noticed with my special profiling tool (see attached image) that 
> writeWithoutConversion calls resolveUnion which performs three HashMap.get's.
> Seeing this a compiled serialiser is there not an opportunity to eliminate 
> these calls which would reduce the Record serialisation cost to something 
> closer the absolute minimum .writeString (.writePrimitive).
>  
> !image-2022-10-18-17-38-44-273.png!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to