Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Everybody loves Benchmarks (Lightning Talk) by ...
Search
Pycon ZA
October 12, 2018
0
68
Everybody loves Benchmarks (Lightning Talk) by Nickolas Grigoriadis
A talk about Python Http client performance.
Pycon ZA
October 12, 2018
Tweet
Share
More Decks by Pycon ZA
See All by Pycon ZA
Trio: Structured Concurrency for Python by Jeremy Thurgood
pyconza
0
230
Preparing for the great snakes migration by Heather Williams
pyconza
0
88
Satellite Data and Super-Resolution to enhance a Slope Soaring Simulator by Schalk Heunis
pyconza
0
160
"Should we just go home on the third Friday afternoon?" by Kim van Wyk
pyconza
0
120
"Dolosse: Distributed Physics Data Acquisition System" by Bertram Losper & Sehlabaka Qhobosheane
pyconza
0
160
Modern JavaScript for Python Developers by Cory Zue
pyconza
0
310
Making Art with Python by Kirk Kaiser
pyconza
0
220
"Posits: A proposed new floating point number format for ML" by Kevin Colville
pyconza
0
140
"Building a label printer using Python, Arduino, duct tape and paperclips" by Johan Beyers
pyconza
0
290
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
67
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
How to train your dragon (web standard)
notwaldorf
97
6.5k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
210
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
37
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
170
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
170
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
0
400
Music & Morning Musume
bryan
46
7k
GitHub's CSS Performance
jonrohan
1032
470k
A better future with KSS
kneath
240
18k
Transcript
1 Everybody loves Benchmarks A quick show of Python HTTP
client performance. Nickolas Grigoriadis
2 We all love Python But a common complaint is
it is slow. Especially for HTTP requests.
3 Common mistakes Create a new “session” for each request:
requests.get(...) Instead do: session = requests.session() # Now re-use session session.get(...)
4 Benchmarks • Done on my old i5-630u notebook. •
Single process. • Against Apache (because I could turn HTTP/1.1 pipelining on/off) • Inside an Alpine-linux Docker container. https://github.com/vibora-io/benchmarks/pull/5
5 Benchmarks! - sync requests requests (opt) urllib3 urllib3 (opt)
PyCurl PyCurl (opt) 0 2000 4000 6000 8000 10000 12000 HTTP/1.0 — 1 HTTP/1.1 — 1
6 Benchmarks! - async aioHTTP aioHTTP (opt) aioHTTP (+uvloop) tornado.simple
tornado.simple (+uvloop) tornado.curl tornado.curl (+uvloop) vibora.client 0 500 1000 1500 2000 2500 3000 3500 4000 4500 HTTP/1.0 — 1 HTTP/1.1 — 1 HTTP/1.0 — 10 HTTP/1.1 — 10