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

Paul Anderson updated AVRO-3643:
--------------------------------
    Description: 
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!

  was:
Sorry for the impetuous 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 from 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 serialisation costs to the absolute minimum 
.writeString (.writePrimitive).

 

!image-2022-10-18-17-38-44-273.png!


> 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