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

Improve import times and runtimes #2485

Merged
merged 11 commits into from Jul 1, 2018
Merged

Improve import times and runtimes #2485

merged 11 commits into from Jul 1, 2018

Conversation

@techalchemy
Copy link
Member

@techalchemy techalchemy commented Jul 1, 2018

  • Lazily import requirementslib
  • Fixes #2843

Signed-off-by: Dan Ryan dan@danryan.co

@techalchemy
Copy link
Member Author

@techalchemy techalchemy commented Jul 1, 2018

Before PR:

 ~/g/pypa-pipenv       time -p pipenv --venv
/home/hawk/.virtualenvs/pypa-pipenv-PuUpLSqX
real 0.93
user 0.84
sys 0.08

After PR:

 ~/g/pypa-pipenv   import-time-improvement     
/home/hawk/.virtualenvs/pypa-pipenv-PuUpLSqX
real 0.31
user 0.26
sys 0.04
techalchemy added 5 commits Jul 1, 2018
- Lazily import requirementslib

Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
- Pew import is super expensive
- Fixes #2843

Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy techalchemy force-pushed the import-time-improvement branch from f45e72a to 547110b Jul 1, 2018
@techalchemy techalchemy added this to the 2018.7.0 milestone Jul 1, 2018
@@ -139,6 +132,8 @@ def which(command, location=None, allow_global=False):

# Disable warnings for Python 2.6.
if 'urllib3' in globals():
import urllib3
from urllib3.exceptions import InsecureRequestWarning
urllib3.disable_warnings(InsecureRequestWarning)

This comment has been minimized.

@uranusjr

uranusjr Jul 1, 2018
Member

I think this can be eliminated altogether. We don’t support 2.6 anymore.

@techalchemy techalchemy merged commit ebaadfc into master Jul 1, 2018
3 checks passed
3 checks passed
@erinxocon
VSTS: pipenv-Python Package-CI 20180701.5 succeeded
Details
buildkite/pipenv Build #687 passed (9 minutes, 54 seconds)
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@techalchemy techalchemy deleted the import-time-improvement branch Jul 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants