googleapis / googleapis/google-cloud-python
Support AsyncBulkWriter
- 主要语言
- Python
- 星标
- 5.4k
- 派生
- 1.8k
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 123
描述
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.
贡献指南
评估
这个 Issue 还没有评估数据。