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

ASF subversion and git services commented on AVRO-2090:
-------------------------------------------------------

Commit b4ede4b116b24b5308e8419504a73e02b7f7e406 in avro's branch 
refs/heads/master from [~raymie]
[ https://gitbox.apache.org/repos/asf?p=avro.git;h=b4ede4b ]

AVRO-2090 second try (#350)

* Finished initial implementation (not tested).

* Added Reader/Decoder code

* Made some of the changes suggested by Doug.

* Hide helper methods related to custom coding.  Changed them from public to 
protected.  Also changed name of encode and decode to customEncode and 
customDecode to be more clear as to their function.

* Allow dynamic changes to flag that controls whether or not the custom 
en/decoders are used.

* Fixed typos in TestSpecificCompiler.java

* New test case: breaks new code-gen when schema needs resolution.

* Fixed bug with decoding when the schema has been migrated.

* Added test-with-custom-coders execution of testing and fixed some problems 
that this uncovered.

* Fixed potential performance problem of redundantly allocating objects.

* Added documentation (also update AVRO-2090 description to point to new docs).

* Small doc fix (I forgot to commit these changes before pushing)


> Improve encode/decode time for SpecificRecord using code generation
> -------------------------------------------------------------------
>
>                 Key: AVRO-2090
>                 URL: https://issues.apache.org/jira/browse/AVRO-2090
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Raymie Stata
>            Assignee: Raymie Stata
>            Priority: Major
>         Attachments: customcoders.md, perf-data.txt
>
>
> New implementation for generation of code for SpecificRecord that improves 
> decoding by over 10% and encoding over 30% (more improvements are on the 
> way).  This feature is behind a feature flag 
> ({{org.apache.avro.specific.use_custom_coders}}) and (for now) turned off by 
> default.  See [Getting Started 
> (Java)|https://avro.apache.org/docs/current/gettingstartedjava.html#Beta+feature:+Generating+faster+code]
>  for instructions.
> (A bit more info: Compared to GenericRecords, SpecificRecords offer 
> type-safety plus the performance of traditional getters/setters/instance 
> variables.  But these are only beneficial to Java code accessing those 
> records.  SpecificRecords inherit serialization and deserialization code from 
> GenericRecords, which is dynamic and thus slow (in fact, benchmarks show that 
> serialization and deserialization is _slower_ for SpecificRecord than for 
> GenericRecord).  This patch extends record.vm to generate custom, 
> higher-performance encoder and decoder functions for SpecificRecords.)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to