googleapis / googleapis/google-cloud-python
Overhead in `put()` due to debugging info
- Langage dominant
- Python
- Étoiles
- 5.4k
- Forks
- 1.8k
- Merge moyen
- 3 j 4 h
- PR mergées (30 j)
- 122
Description
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?
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.