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

ASF GitHub Bot commented on AVRO-1809:
--------------------------------------

GitHub user DrVirtual opened a pull request:

    https://github.com/apache/avro/pull/76

    AVRO-1809 Removed creator's thread caching from 
GenericDatumReader.getResolver

    For more explanation please read 
https://issues.apache.org/jira/browse/AVRO-1809

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DrVirtual/avro 
AVRO-1809-Removed-redundant-GenericDatumReader.getResolver-optimization

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/avro/pull/76.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #76
    
----
commit 54efba3b7be9408337479477a83fcf7d4260ac20
Author: k.usachev <k.usac...@corp.mail.ru>
Date:   2016-03-10T16:19:00Z

    AVRO-1809 Removed creator's thread caching from 
GenericDatumReader.getResolver

----


> I wish to remove optimization from GenericDatumReader.getResolver
> -----------------------------------------------------------------
>
>                 Key: AVRO-1809
>                 URL: https://issues.apache.org/jira/browse/AVRO-1809
>             Project: Avro
>          Issue Type: Wish
>          Components: java
>            Reporter: Konstantin Usachev
>            Priority: Minor
>
> There is an optimization at 
> org.apache.avro.generic.GenericDatumReader.getResolver, when we cache creator 
> thread and it's first returned value. At first, It looks redundant, because 
> it saves three calls to Map.get, which is unmeasurable, especially after 
> Schema's hashcode calculation optimization, made by the same author 
> [~cutting], it's not obvious and adds additional complexity. Also caching of 
> current thread whould be a source of bugs in case of different green threads 
> libraries integration (which, actually, occurred during integration with 
> Quasar).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to