Description
Old Behavior
Currently, IDOM relies on synchronous code to properly queue renders. This code blocks the asyncio event loop, causing massive concurrency issues.
See section "Two Worlds of Python" for why this is a problem:
https://arunrocks.com/a-guide-to-asgi-in-django-30-and-its-performance/
New Behavior
Rewrite parts of IDOM core to do everything using asyncio.
Implementation Details
Anything that relies on order of operations should be executed in a FIFO queue.
If synchronous code is required, it should be run in a thread in order to avoid blocking asyncio event loops.
All synchronous functions should be converted to async within IDOM core.
I had previously attempted threading the django-idom
dispatcher as a quick fix, but that did not yield worthwhile performance benefits, likely due to context switching.
Code of Conduct
- I agree to follow the Code of Conduct.