googleapis / googleapis/google-cloud-python

Overhead in `put()` due to debugging info

Đang mở
#15,831 1 bình luận 0 reaction 1 người được giao Được @daniel-sanche nhận Xem trên GitHub
api: datastore priority: p3 type: bug
Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
122

Mô tả

While profiling our NDB app, I noticed protobuf `__repr__` calls appearing higher than expected in our total profile. According to the profile, These are called from within `put()` in `_datastore_api.py`.

As far as I can tell, the culprit seems to be [this line](https://github.com/googleapis/python-ndb/blob/85943208a884e9c232693e87339e701d27c78d37/google/cloud/ndb/_datastore_api.py#L505), which serializes a text representation of the entire RPC `put` command into the `info` field. Could it be that this creates unnecessary overhead for large entities?

Image

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.