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

Scott Carey commented on AVRO-853:
----------------------------------

Related thoughts (for possible new JIRA tickets):

* Aliases should be part of Name.  Only named types (record, enum, fixed) and 
fields can have aliases and much of the alias resolution and helper methods can 
be encapsulated in Name, along with the hashCode/equals complications.
* "doc" should also go into Name.  Only named types and fields can have "doc".  
The spec seems ambiguous with respect to allowing arbitrary properties named 
"doc" for unnamed types.  
* Name can be simplified if it did not deal with 'anonymous' records (are these 
used anywhere other than protocols?).  This can be done if RecordSchema is 
split in two, one for anonymous records and one for named records.

> Cache hash codes in Schema and Field
> ------------------------------------
>
>                 Key: AVRO-853
>                 URL: https://issues.apache.org/jira/browse/AVRO-853
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>    Affects Versions: 1.5.1
>            Reporter: Douglas Kaminsky
>         Attachments: AVRO-853-approach2.patch, AVRO-853.patch
>
>
> We are experiencing a serious performance degradation when trying to 
> store/retrieve fields and schemas in hash-based data structures (eg. 
> HashMap). Since all fields and schemas are immutable (with the exception of 
> RecordSchema allowing deferred setting of Fields) it makes sense to cache the 
> hash code on the object instead of recalculating every time the hashCode 
> method gets called. 
> (Are there other mutable Schema sub-types that I'm not thinking about?)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to