[ https://issues.apache.org/jira/browse/AVRO-1268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13596845#comment-13596845 ]
Alexandre Normand commented on AVRO-1268: ----------------------------------------- Again, thanks for the feedback Doug. A few thoughts: * Regarding the tests using SpecificRecords, shouldn't those be moved under {{maven-plugin}} rather than {{compiler}}? This would be the way to have generated sources prior to the compilation/execution of tests that use specific records generated from schemas. * About the benchmark results, I did run each a few times and copied here what seems like an average (they didn't vary by much). To be clear, the before/after from my [first results|https://issues.apache.org/jira/browse/AVRO-1268?focusedCommentId=13595613&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13595613] _should_ be similar since there's no stringable serialization/deserialization involved but it looks like the extra getClassProp that in turn calls Schema#getProp causes a performance hit. Maybe that's made worse by the fact that this is done on every readElement/writeElement and it would explain somewhat better results if I remove the #getClassProp from readElement/writeElement. I'm moving the tests now and then I'll resume the work on addressing the performance by incorporating your suggestions. I'll try to post an updated patch on Sunday. > Add java-class, java-key-class and java-element-class support for stringable > types to SpecificData > -------------------------------------------------------------------------------------------------- > > Key: AVRO-1268 > URL: https://issues.apache.org/jira/browse/AVRO-1268 > Project: Avro > Issue Type: Improvement > Components: java > Affects Versions: 1.7.4 > Reporter: Alexandre Normand > Assignee: Alexandre Normand > Priority: Minor > Fix For: 1.7.5 > > Attachments: AVRO-1268.patch, AVRO-1268.patch > > > Stringable types are java classes that can be serialized through strings > (which require a single string constructor and a valid toString() > implementation). ReflectData currently has support from stringable types but > it would be desirable to get this feature with SpecificData. > The work involves changes to the SpecificCompiler (depends on {{@java-class}} > support in AVRO-1267) to generate the specific sources with the proper java > type as well as moving the ReflectDatumReader and ReflectDatumWriter to read > the java-class/java-key-class and java-element-class properties. -- 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