#asyncio
Every summary, chronological. Filter by category, tag, or source from the rail.
Tag · #asyncio
Why Async Isn't Always Faster for Batch Jobs
Concurrency is not a universal performance fix. In CPU-bound or connection-heavy batch processing, the overhead of the event loop and increased database contention can make async code slower than simple thread-pooled synchronous code.
Python in Plain English
Fire-and-Forget Background Tasks: Python's 500ms Rule
Keep request-response under 500ms by decoupling acknowledgment (HTTP 202) from execution. Use reference registries for asyncio, FastAPI BackgroundTasks for light work, multiprocessing for CPU tasks, or Celery for persistent, scalable jobs.
Python in Plain English
Showing 2 of 2