4 ms·
> Have you tried comparing the performance of asyncio based network requests versus multithreaded requests Nope, but the performance of an individual request o
by orf 10y ago
> Have you tried comparing the performance of asyncio based network requests versus multithreaded requests
Nope, but the performance of an individual request overhead isn't much of a data point. The advantage is that it scales to thousands of connections easily, there are no concurrency/threading problems, and you can mix and match protocols easily. None of that is easy with threading. Threads can also be quite expensive to start and manage.
That specific case is handled by threading, yes, but if you're making a webservice that makes requests to a bunch of endpoints during when processing a HTTP request and also sends output to IRC/Slack whilst simultaneously serving files over FTP and launching a bunch of external processes for good measure then asyncio has your back.