Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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.