[ 
https://issues.apache.org/jira/browse/CALCITE-1092?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh Elser resolved CALCITE-1092.
---------------------------------
       Resolution: Fixed
    Fix Version/s:     (was: next)
                   1.7.0

Fixed in 
https://git1-us-west.apache.org/repos/asf?p=calcite.git;a=commit;h=0de38aaa38e0dc43d21c0b2dac4278c67c1dc24c

> Cache FieldDescriptors when deserializing Protobufs
> ---------------------------------------------------
>
>                 Key: CALCITE-1092
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1092
>             Project: Calcite
>          Issue Type: Sub-task
>          Components: avatica
>            Reporter: Josh Elser
>            Assignee: Josh Elser
>             Fix For: 1.7.0
>
>
> To determine if a Protobuf message contains an optional attribute (and not 
> the default value), we need to use the appropriate {{FieldDescriptor}} and 
> call the {{hasField(FieldDescriptor)}} method on the {{Message}}.
> Through some profiling, I've found that we spend a non-zero amount of time in 
> the update path doing HashMap operations. The naive implementation I did the 
> first time around would get the necessary FieldDescriptor for each optional 
> attribute in each deserialization. These descriptors are actually singletons, 
> so we're just wasting a lot of time repeatedly accessing the same object in 
> the HashMap over and over again.



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

Reply via email to