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-1277) Improve performance of reflection-based serializers
Date Thu, 21 Mar 2013 17:59:17 GMT

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

Doug Cutting commented on AVRO-1277:
------------------------------------

This looks like great stuff!  Some comments:
 - Can you please add some test cases to Perf.java that illustrate the performance improvement?
 We shouldn't make optimizations without benchmarks.
 - In readArray(), you might move the test for whether an Accessor is applicable to the start
of the method, and, when it's not, simply call super.readArray().  That would also tighten
the inner loop a bit.
 - Just remove the old FIELD_CACHE code, rather than commenting it out.
                
> Improve performance of reflection-based serializers
> ---------------------------------------------------
>
>                 Key: AVRO-1277
>                 URL: https://issues.apache.org/jira/browse/AVRO-1277
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.7.4
>            Reporter: Leo Romanoff
>            Priority: Minor
>         Attachments: AVRO-1277.patch
>
>
> I've played a bit with Avro serialization based on reflection, i.e. with the classes
from org.apache.avro.generic package.
> It works fine in this mode, but is rather slow compared to such frameworks like protostuff
or kryo.
> Quick look at the source code has shown that a lot of reflection-based operations and
class lookups are not cached. And such operations are usually pretty expensive when executed
by a JVM. 
> So I changed some of org.apache.avro.generic classes, introduced caching and a few other
optimizations. Now it seems to perform much better.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message