8000 Batches in >=2.0.0 are significantly slower · Issue #145 · googleapis/python-datastore · GitHub
[go: up one dir, main page]

Skip to content

Batches in >=2.0.0 are significantly slower #145

@BinarSkugga

Description

@BinarSkugga

I believe there is a change of API or a performance issue when using batches with 2.1.0.

Environment details

  • OS type and version: Windows 10
  • Python version: 3.8.7
  • pip version: 20.3.3
  • google-cloud-datastore version: 2.1.0
  • google-api-core version: 1.24.1

Steps to reproduce

  1. Use DatastoreClient::put_multi with 500 entities inside a batch

Code example

with client.batch():
    client.put_multi(chunk)

Performance

When using 1.15.0, my code can handle 9 batches of 500 entities in about 1-2 seconds while 2.1.0 takes literal minutes.
Disclaimer: I use the datastore emulator

EDIT: It can be reproduced in 2.0.0

Metadata

Metadata

Labels

api: datastoreIssues related to the googleapis/python-datastore API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0