You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Baruch Shushi (Jira)" <ji...@apache.org> on 2020/10/18 22:38:00 UTC
[jira] [Updated] (AVRO-2939) SpecificData.getForClass() cause
performance degradation
[ https://issues.apache.org/jira/browse/AVRO-2939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Baruch Shushi updated AVRO-2939:
--------------------------------
Issue Type: Bug (was: New Feature)
> SpecificData.getForClass() cause performance degradation
> --------------------------------------------------------
>
> Key: AVRO-2939
> URL: https://issues.apache.org/jira/browse/AVRO-2939
> Project: Apache Avro
> Issue Type: Bug
> Components: java
> Affects Versions: 1.10.0, 1.9.1, 1.9.2
> Reporter: Baruch Shushi
> Priority: Minor
>
> Every generated Object.newBuilder() has downstream call to SpecificData.getForClass() since version 1.9.X which is ~37 times slower than version 1.8.2.
> This is due to the NoSuchFieldException thrown on every Builder instantiation.
> Sample code to run the benchmarks can be found [here|https://github.com/baruchshushi/avro-performance-degradation]
> *JMH results for 1.8.2:*
> Result "com.example.Main.benchmark":
> 24.877 ±(99.9%) 0.153 ms/op [Average]
> (min, avg, max) = (24.426, 24.877, 25.542), stdev = 0.272
> CI (99.9%): [24.724, 25.030] (assumes normal distribution)
>
> *JMH results for 1.10.0:*
> Result "com.example.Main.benchmark":
> 923.214 ±(99.9%) 28.436 ms/op [Average]
> (min, avg, max) = (858.940, 923.214, 989.746), stdev = 50.545
> CI (99.9%): [894.778, 951.650] (assumes normal distribution)
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)