googleapis / googleapis/google-cloud-python
Overhead in `put()` due to debugging info
Offen
#15,831
1 Kommentar
0 Reaktionen
1 zugewiesene Person
Beansprucht von @daniel-sanche
Auf GitHub ansehen
api: datastore
priority: p3
type: bug
- Vorherrschende Sprache
- Python
- Sterne
- 5.4k
- Forks
- 1.8k
- Ø Merge
- 3 T. 4 Std.
- Gemergte PRs (30 T.)
- 122
Beschreibung
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?
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.