Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pyup is incredibly inefficient in its connection handling #341

Open
thanatos opened this issue Mar 18, 2019 · 1 comment
Open

pyup is incredibly inefficient in its connection handling #341

thanatos opened this issue Mar 18, 2019 · 1 comment
Labels
considering Under consideration enhancement

Comments

@thanatos
Copy link

If you run pyup in verbose mode, you'll see something like,

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): pypi.org:443
DEBUG:urllib3.connectionpool:https://pypi.org:443 "GET /pypi/freezegun/json HTTP/1.1" 200 10740
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): pypi.org:443
DEBUG:urllib3.connectionpool:https://pypi.org:443 "GET /pypi/jsonschema/json HTTP/1.1" 200 11591
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): pypi.org:443
DEBUG:urllib3.connectionpool:https://pypi.org:443 "GET /pypi/mock/json HTTP/1.1" 200 7499
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): pypi.org:443
DEBUG:urllib3.connectionpool:https://pypi.org:443 "GET /pypi/moto/json HTTP/1.1" 200 24418

For each package it needs to look up on an index server, pyup is opening a fresh TLS/TCP connection. These are expensive to set up for everyone involved, and it feels like pyup would probably run considerably faster if it held on to the connection.

(pyup appears to make use of requests, which makes this rather easy to accomplish: instead of calling the request.<method> methods, simply create a Session and call the methods on that.)

@rafaelpivato rafaelpivato added considering Under consideration enhancement labels Mar 28, 2020
@rafaelpivato
Copy link
Contributor

Sounds like a valid concern to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
considering Under consideration enhancement
Projects
None yet
Development

No branches or pull requests

2 participants