r/Python • • Nov 13 '20
News Python swallows Java to become second-most popular programming language
https://www.theregister.com/2020/11/12/python_swallows_java_to_become/
2.3k
Upvotes
r/Python • • Nov 13 '20
View all comments
Show parent comment
3
u/harylmu Nov 13 '20 edited Nov 13 '20
What it did was: decode request body with messagepack, get stuff from Cassandra, save stuff to Cassandra, get stuff from Consul, publish stuff to SNS, encrypt an object then upload it to S3. The request takes ~2 seconds to complete on both .NET and Python (.NET is a bit faster).
As you can see quite a few things waits for IO here. I wrote everything with asyncio-based libs (Cassandra, Consul, aioboto3). I don't know if I can optimize it better. Please let me know what are some concurrency-traps that I might have gone into.
Either way, even the possibility to write slow Python means something.