alpacahq / alpacahq/alpaca-backtrader-api
100% CPU utilization during paper trading
Đang mở
- Ngôn ngữ chính
- Python
- Star
- 702
- Fork
- 160
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
When running readme paper trading sample - CPU utilization is ~100%.
Most of the cpu ticks spent in the following loop of alpacastore.py (_t_order_create):
```
while True:
try:
if self.q_ordercreate.empty():
continue
```
Adding simple `_time.sleep(0.05)` before `continue` reduces cpu consumption to about 0.02%.
I can create a pull request if such fix is correct way of addressing the problem.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.