googleapis / googleapis/google-cloud-python

Overhead in `put()` due to debugging info

Aperta
#15,831 1 commento 0 reazioni 1 assegnatario Rivendicata da @daniel-sanche Vedi su GitHub
api: datastore priority: p3 type: bug
Lingua principale
Python
Stelle
5.4k
Fork
1.8k
Merge medio
3g 4h
PR unite (30g)
122

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.