You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Most of the OdkCentral code is network IO bound.
Using async code is much more efficient for this use case, as code is executed in an event loop: while waiting for the response from some IO operation, another process can be executed (essentially in parallel), instead of locking the thread waiting for the response.
All modern web APIs in Python are ASGI now, so the default is async upstream. Usage of a sync library in an async framework is problematic.
Describe the solution you'd like
Update requests --> aiohttp or httpx.
Rewrite all class methods + functions to be async:
Add async def everywhere.
await database calls.
await network operations.
Describe alternatives you've considered
Keeping everything as synchronous code, as it's a lot of work to update all of our dependent libraries.
Additional considerations
This should wait until a good point when we have time to refactor lots of code.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
async def
everywhere.await
database calls.await
network operations.Describe alternatives you've considered
Additional considerations
The text was updated successfully, but these errors were encountered: