We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
Talks - Joongi Kim: Improving debuggability of complex asyncio applications
Improve debuggability of complex asyncio applications by understanding its limitations, using the right libraries, and leveraging tools like time module, _syncio library, and STEP debugger to inspect and control execution.
- Improving debuggability of asyncio applications starts by understanding the basics of asyncio and its limitations.
 - Coroutines and tasks in asyncio are inherently lightweight and should be used to handle I/O-bound tasks, not CPU-intensive tasks.
 - 
Using libraries like 
trioandcuriocan simplify development and improve performance. - async/await syntax can help write more readable and synchronous-like code, but should be used with caution due to the overhead of switching between the event loop and the CPU.
 - 
To debug asyncio applications, use tools like the 
timemodule,_synciolibrary, andSTEPdebugger to inspect and control the execution of coroutines and tasks. - When debugging asyncio applications, use a narrowed exception message and inspect the stack trace to identify the problematic code.
 - 
If using libraries like 
async_timeoutoraiosmtpd, ensure that they are configured correctly and do not interfere with the event loop. - 
When using 
pytestin a Jupyter notebook, use thepytest-asynciolibrary to properly run and test asyncio tests. - 
To improve the performance of asyncio applications, use a profiler like 
line_profilerorsnakevizto identify performance bottlenecks and optimize the code. - 
To reduce the risk of memory leaks in asyncio applications, use tools like 
mypyandpytestto identify potential issues before they become a problem.