[
https://issues.apache.org/jira/browse/AVRO-989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192599#comment-13192599
]
James Baldassari commented on AVRO-989:
---------------------------------------
That's a good point; this would require regenerating/recompiling the specific
record classes. I guess the base classes and the generated implementations are
a little too tightly coupled. If we had protected methods like 'boolean
isSet(int field)' on RecordBuilderBase then we would be able to change the
underlying implementation from a boolean[] to a BitSet without breaking
backwards compatibility. It sounds like we'll need to hold this change back
until 1.7.0 as you suggested.
Since we're probably not going to get this in for 1.6, do you think I should
rework this patch to reduce coupling in Builder API? Or should that be a
separate patch? If reducing coupling in the whole Record API is a separate
issue for 1.7, we could also roll in the change to make the record fields
private in favor of the accessor/mutator methods introduced in AVRO-839.
> Java: Improve Builder performance in Specific API
> --------------------------------------------------
>
> Key: AVRO-989
> URL: https://issues.apache.org/jira/browse/AVRO-989
> Project: Avro
> Issue Type: Improvement
> Components: java
> Reporter: Scott Carey
> Attachments: AVRO-989-v2.patch, AVRO-989.patch
>
>
> The Specific API generates Builder objects for each record. This builder
> uses a boolean[] to store flags for each field to indicate whether the field
> is set or not.
> This is not space efficient, a boolean[] takes 16 bytes plus one byte per
> field, rounded up to the nearest 8 byte interval.
> This can be improved on by using BitSet for large records, and bitmasks on an
> int for records with less than 32 fields.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira