Taming Asynchronous Beasts: Debugging and Performance Tuning in a Coroutine World
Status: Accepted
Asynchronous code can be challenging to debug and optimize, especially when dealing with complex coroutine hierarchies and flow transformations. This session reveals practical techniques for tracking down elusive bugs, optimizing performance, and maintaining reliability in coroutine-heavy applications.
Drawing from real production experience, we'll explore advanced debugging techniques, common performance pitfalls, and practical solutions for the most challenging scenarios. You'll learn how to effectively use built-in tools, recognize problematic patterns, and implement proven optimization strategies.
Key takeways:
- Using kotlinx-coroutines-debug
- Using BlockHound
- Measuring channel sizes, waiting for coroutines in network clients, and the number of active coroutines
- Tracking threads use
- Measuring buffer sizes
- Tracking and finding memory leaks
- Choosing appropriate synchronization
- Thread management
- Designing concurrency
- Proper cancellation use