Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Everybody loves Benchmarks (Lightning Talk) by ...
Search
Pycon ZA
October 12, 2018
92
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Everybody loves Benchmarks (Lightning Talk) by Nickolas Grigoriadis
A talk about Python Http client performance.
Pycon ZA
October 12, 2018
More Decks by Pycon ZA
See All by Pycon ZA
Trio: Structured Concurrency for Python by Jeremy Thurgood
pyconza
0
280
Preparing for the great snakes migration by Heather Williams
pyconza
0
120
Satellite Data and Super-Resolution to enhance a Slope Soaring Simulator by Schalk Heunis
pyconza
0
200
"Should we just go home on the third Friday afternoon?" by Kim van Wyk
pyconza
0
150
"Dolosse: Distributed Physics Data Acquisition System" by Bertram Losper & Sehlabaka Qhobosheane
pyconza
0
200
Modern JavaScript for Python Developers by Cory Zue
pyconza
0
360
Making Art with Python by Kirk Kaiser
pyconza
0
270
"Posits: A proposed new floating point number format for ML" by Kevin Colville
pyconza
0
180
"Building a label printer using Python, Arduino, duct tape and paperclips" by Johan Beyers
pyconza
0
350
Featured
See All Featured
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
920
Designing Powerful Visuals for Engaging Learning
tmiket
1
600
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
400
A designer walks into a library…
pauljervisheath
211
25k
Code Review Best Practice
trishagee
74
20k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
The Curious Case for Waylosing
cassininazir
1
560
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
480
YesSQL, Process and Tooling at Scale
rocio
174
15k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
50
10k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.3k
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