0

I'm interested if anyone has run a benchmark on urllib/urllib2 vs pycurl performance. I know there has been a benchmark between pycurl and requests, but has anyone done this for urllib2/urllib vs pycurl in (preferably) python 2.7 or python 3.6 (or any other version of python if the benchmark was not run in these versions)?

Alternatively, for those in the community that are familiar with pycurl and urllib/urllib2, can you share some insight on which library you would expect to exhibit higher performance for some structural reason (I know that pycurl is a relatively light client for the fast libcurl, but I don't know enough about how urllib/urllib2 were built to compare).

Thank you!

  • Possible duplicate of [Python Requests vs PyCurl Performance](https://stackoverflow.com/questions/15461995/python-requests-vs-pycurl-performance) – Bailey Parker Jan 19 '18 at 23:21
  • Bailey Parker to my knowledge this is not a duplicate of "Python Requests vs PyCurl Performance" because Requests is not built on urllib/urllib2 (to my understanding it is built on urllib3) – I_program_hard Jan 19 '18 at 23:24
  • 1
    Look at the graphs in the accepted answer. They seem to have also benchmarked urllib – Bailey Parker Jan 19 '18 at 23:25
  • It appears that the tl;dr they arrive at also applies to pycurl vs urllib: use pycurl if you really need the performance (and have lots of requests) – Bailey Parker Jan 19 '18 at 23:27
  • OK Bailey, I see it now, thank you! This is partially answered in the graphs. They didn't do any https benchmarking which is a shame, this is actually what is most interesting to me, but as far as how I asked the above question, I agree it is a potential duplicate of the previous answer. You can either mark this as a duplicate or submit your comment as an answer so that I can accept it. I may ask another question in the future specifically focusing on https – I_program_hard Jan 19 '18 at 23:38
  • If you're looking for HTTPS benchmarks, my guess would be that would magnify the advantage of pycurl, but you'd definitely want numbers to verify that for your use case. You can of course edit your question to specify that you're looking for HTTPS benchmarks. Of course, you definitely want to make sure you aren't prematurely optimizing. If you haven't identified that this will be a bottleneck in your usecase with benchmarks of your own, you may want to proceed with whatever you are more comfortable with. – Bailey Parker Jan 19 '18 at 23:45

0 Answers0