kirill-stepanishin commented on code in PR #3493:
URL: https://github.com/apache/tinkerpop/pull/3493#discussion_r3501024965


##########
gremlin-python/src/main/python/gremlin_python/structure/io/graphbinaryV4.py:
##########
@@ -149,6 +152,9 @@ def __init__(self, deserializer_map=None, 
pdt_registry=None):
         if deserializer_map:
             self.deserializers.update(deserializer_map)
         self.pdt_registry = pdt_registry
+        # Mirror of self.deserializers keyed by int type code instead of 
DataType.
+        # Avoids the per-read DataType(bt) call, whose aenum construction 
negatively affects performance on large results.
+        self._objectify_by_code = {dt.value: des.objectify for dt, des in 
self.deserializers.items()}

Review Comment:
   Renamed the map to `_deserializer_by_type_code`, I think it makes more sense 
now. Thanks for the suggestion!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to