Use a Session to enable connection pooling

Review Request #981 - Created Sept. 3, 2014 and submitted

Information
David Taylor
pants
02b944f...
Reviewers
pants-reviews
benjyw

Requests and urllib3 automatically reuse connections if using a Session, which otherwise has all the same methods as the main Requests API, making this a drop-in replacement: http://docs.python-requests.org/en/latest/user/advanced/

In my tests, this change cut 830 HEAD requests to Foursquare's internal artifact cache from 22s to 11s.

Using 830 cache keys copied from a real build, this change cut the time to do HEAD requests for each from 22s to 11s.

https://travis-ci.org/pantsbuild/pants/builds/38515947

Issues

  • 0
  • 2
  • 0
  • 2
Description From Last Updated
Benjy Weinberger
David Taylor
Johan Oskarsson
Patrick Lawson
David Taylor
David Taylor
Review request changed

Status: Closed (submitted)

Change Summary:

cc8931e7378293fe5f962239a2d2da55e6d8a0a6 
Benjy Weinberger

Ship It!

Loading...