avro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Doug Cutting (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AVRO-383) Optiminzing ResolvingDecoder for default values
Date Wed, 27 Jan 2010 19:11:34 GMT

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

Doug Cutting commented on AVRO-383:

Another way to implement ResolvingParserGenerator.java::encode() might  be to call GenericData#defaultFieldValue()
then use GenericDatumWriter to encode this as binary.  This might be a bit slower, but it
would use a lot less code, and this is done at schema-compilation time, so shouldn't be too
performance critical.

> Optiminzing ResolvingDecoder for default values
> -----------------------------------------------
>                 Key: AVRO-383
>                 URL: https://issues.apache.org/jira/browse/AVRO-383
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Thiruvalluvan M. G.
>            Assignee: Thiruvalluvan M. G.
>         Attachments: AVRO-383-test.patch, AVRO-383.patch
> When the reader's and writer's schemas are records and the reader's schema has a field
with default value and the writer's schema doesn't have the field, the ResolvingDecoder keeps
the default value in a byte array. This byte array is in Json format. Moving this to Avro
binary format improves performance.
> Apply the test patch and try "Perf -M". Then apply the patch and run it again. On my
machine, the performance is three times the original.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message