Open kaliiiiiiiiii opened 7 months ago
aiotinydb uses:
aiofiles
(uses threading internally, typehints not available:/7)asyncio.Lock
I might take a look at this in the near future. There is a good chance that aiotinydb already has better performance than the original tinydb. The biggest reason the original tinydb is "slow" is that it waits for fileIO on every write. Mitigating this in any way, be it AsyncIO or Threading should improve performance quite a bit.
For DiskIO, asyncio support would be nice. ( + optionally multiprocessing for CPU-bound search)
To my knowledge, read//write to disk is (altho depending on OS) generally only supported blocking. Therefore, I'd propose using a
threadpool
for this.https://github.com/aiotinydb/aiotinydb already has that implemented, however assuming that performance is same as for the original
tinydb