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

Leo Romanoff commented on AVRO-1277:
------------------------------------

Regarding static vs non-static caches:
Should I still do something in scope of this issue or should I file a separate 
one?

> Using Unsafe when on a JVM that supports it is a great idea. Would you like 
> to file a Jira for that?

Sure, I can do that. In fact I did the same optimization for Kryo already and 
performance boost quite significant there. An even bigger performance boost can 
be obtained if you use Unsafe-based Input/Output streams. For more info, please 
have a look at these two links:
http://code.google.com/p/kryo/issues/detail?id=75
https://groups.google.com/forum/?fromgroups=#!topic/kryo-users/o_vQsEBVPeU

It looks like improving performance of serialization frameworks is slowly 
becoming my hobby. I did it already for Kryo, protostuff-runtime, JDBM3/MapDB 
and now do it for Avro ;-) And Hazelcast is in the waiting queue ...


                
> 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, AVRO-1277-v2.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

Reply via email to