googleapis / googleapis/google-cloud-python

Support AsyncBulkWriter

Đang mở
#15,370 1 bình luận 0 reaction 1 người được giao Được giao cho @daniel-sanche Xem trên GitHub
api: firestore priority: p3 type: feature request
Ngôn ngữ chính
Python
Star
5.4k
Fork
1.8k
Merge trung bình
3 ngày 4 giờ
Pull request đã merge (30 ngày)
122

Mô tả

While the current implementation of BulkWriter offers performance gains over batch writes, it has the following comment:

```
The submission of batches is internally parallelized with a ThreadPoolExecutor,
meaning end developers do not need to manage an event loop or worry about asyncio
to see parallelization speed ups (which can easily 10x throughput). Because
of this, there is no companion `AsyncBulkWriter` class, as is usually seen
with other utility classes.
```

In fact, the flush method uses time.sleep, which is explicitly blocking. It would be great to have an actual async bulk writer as the current version is not useful in truly async codebases.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.