googleapis / googleapis/google-cloud-python

Overhead in `put()` due to debugging info

Ouverte
#15,831 1 commentaire 0 réactions 1 personne assignée Réclamée par @daniel-sanche Voir sur GitHub
api: datastore priority: p3 type: bug
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?

Image

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.