art049 / odmantic

Sync and Async ODM (Object Document Mapper) for MongoDB based on python type hints
http://art049.github.io/odmantic
ISC License
1.05k stars 93 forks source link

Motor uses ThreadPoolExecutor, it drastically decreases a performance #464

Open nikita-davydov opened 4 months ago

nikita-davydov commented 4 months ago

Is there any plan to make this library really async?

It seems like that nobody who uses async motor understand that it's not really async.

z0z0r4 commented 4 months ago

More information? This package uses motor by threading?

nikita-davydov commented 4 months ago

Just look into the sources of the official motor library: https://github.com/mongodb/motor/blob/master/motor/metaprogramming.py#L25

Any project that will use that for their requests to the mongoDB will have the performance decreased for sure.

z0z0r4 commented 4 months ago

Just look into the sources of the official motor library: https://github.com/mongodb/motor/blob/master/motor/metaprogramming.py#L25

Any project that will use that for their requests to the mongoDB will have the performance decreased for sure.

Emmm, I have not enough ability to confirm is it true...

The cost is too much to achieve and maintain an unofficial async package as same as pymongo...

Any response in motor jira about this problem?

nikita-davydov commented 4 months ago

They just have the dead JIRA ticket about that so seems like they're not going to implement the real asyncio connection