Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(perf): improve performance unmarshalling entities from protobuf2 #175

Merged
merged 2 commits into from May 25, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions google/cloud/datastore/helpers.py
Expand Up @@ -138,7 +138,7 @@ def entity_from_protobuf(pb):
entity_meanings = {}
exclude_from_indexes = []

for prop_name, value_pb in _property_tuples(proto_pb):
for prop_name, value_pb in _property_tuples(proto_pb._pb):
value = _get_value_from_value_pb(value_pb)
entity_props[prop_name] = value

Expand All @@ -154,7 +154,7 @@ def entity_from_protobuf(pb):
if is_list and len(value) > 0:
exclude_values = set(
value_pb.exclude_from_indexes
for value_pb in value_pb._pb.array_value.values
for value_pb in value_pb.array_value.values
)
if len(exclude_values) != 1:
raise ValueError(
Expand Down