{"action":"created","issue":{"url":"https://api.github.com/repos/kennethreitz/pipenv/issues/953","repository_url":"https://api.github.com/repos/kennethreitz/pipenv","labels_url":"https://api.github.com/repos/kennethreitz/pipenv/issues/953/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/pipenv/issues/953/comments","events_url":"https://api.github.com/repos/kennethreitz/pipenv/issues/953/events","html_url":"https://github.com/kennethreitz/pipenv/issues/953","id":267695504,"number":953,"title":"Simple commands (such as autocompletion and --version) take a relatively long time","user":{"login":"PolarPayne","id":7122178,"avatar_url":"https://avatars0.githubusercontent.com/u/7122178?v=4","gravatar_id":"","url":"https://api.github.com/users/PolarPayne","html_url":"https://github.com/PolarPayne","followers_url":"https://api.github.com/users/PolarPayne/followers","following_url":"https://api.github.com/users/PolarPayne/following{/other_user}","gists_url":"https://api.github.com/users/PolarPayne/gists{/gist_id}","starred_url":"https://api.github.com/users/PolarPayne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PolarPayne/subscriptions","organizations_url":"https://api.github.com/users/PolarPayne/orgs","repos_url":"https://api.github.com/users/PolarPayne/repos","events_url":"https://api.github.com/users/PolarPayne/events{/privacy}","received_events_url":"https://api.github.com/users/PolarPayne/received_events","type":"User","site_admin":false},"labels":[{"id":522150498,"url":"https://api.github.com/repos/kennethreitz/pipenv/labels/possible%20bug","name":"possible bug","color":"d86c3a","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-10-23T14:43:04Z","updated_at":"2017-10-23T19:07:23Z","closed_at":null,"author_association":"NONE","body":"Evaluating the autocomplete takes a very long time (closer to a second).\r\n`eval \"$(env _PIPENV_COMPLETE=source-bash pipenv)\"`\r\n\r\nAutocompletions also take closer to a second, as does running pretty much any command (no matter how simple).\r\n\r\nI had to disable the autocompletion as it adds too much time to my terminals startup (actually I just took the output of the command to my .bashrc for now).\r\n\r\n##### Describe you environment\r\n\r\n1. Linux (Ubuntu 17.04)\r\n1. Python version: Python 3.5.3\r\n1. Pipenv version: pipenv, version 8.2.7\r\n\r\n##### Expected result\r\n\r\nThese simple commands shouldn't take more than a few milliseconds.\r\n\r\n##### Steps to replicate\r\n\r\n```bash\r\n$ time env _PIPENV_COMPLETE=source-bash pipenv --verbose\r\n\r\n_pipenv_completion() {\r\n    local IFS=$'\\t'\r\n    COMPREPLY=( $( env COMP_WORDS=\"${COMP_WORDS[*]}\" \\\r\n                   COMP_CWORD=$COMP_CWORD \\\r\n                   _PIPENV_COMPLETE=complete-bash $1 ) )\r\n    return 0\r\n}\r\n\r\ncomplete -F _pipenv_completion -o default pipenv\r\n\r\nreal    0m0,763s\r\nuser    0m0,708s\r\nsys     0m0,056s\r\n```\r\n\r\n```bash\r\n$ time pipenv --version\r\npipenv, version 8.2.7\r\n\r\nreal    0m0,646s\r\nuser    0m0,600s\r\nsys     0m0,040s\r\n```"},"comment":{"url":"https://api.github.com/repos/kennethreitz/pipenv/issues/comments/338764497","html_url":"https://github.com/kennethreitz/pipenv/issues/953#issuecomment-338764497","issue_url":"https://api.github.com/repos/kennethreitz/pipenv/issues/953","id":338764497,"user":{"login":"nateprewitt","id":5271761,"avatar_url":"https://avatars0.githubusercontent.com/u/5271761?v=4","gravatar_id":"","url":"https://api.github.com/users/nateprewitt","html_url":"https://github.com/nateprewitt","followers_url":"https://api.github.com/users/nateprewitt/followers","following_url":"https://api.github.com/users/nateprewitt/following{/other_user}","gists_url":"https://api.github.com/users/nateprewitt/gists{/gist_id}","starred_url":"https://api.github.com/users/nateprewitt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nateprewitt/subscriptions","organizations_url":"https://api.github.com/users/nateprewitt/orgs","repos_url":"https://api.github.com/users/nateprewitt/repos","events_url":"https://api.github.com/users/nateprewitt/events{/privacy}","received_events_url":"https://api.github.com/users/nateprewitt/received_events","type":"User","site_admin":false},"created_at":"2017-10-23T19:07:23Z","updated_at":"2017-10-23T19:07:23Z","author_association":"COLLABORATOR","body":"@techalchemy it is slower than it needs to be. I fixed this a few months back and it looks like the big wave of changes in the last month reintroduced it.\r\n\r\nIt's just that the cli method has become so overloaded it does a lot of checks with every call that aren't necessary in cases like this.\r\n\r\nWe can fix it again but at best I think we'll be around 400ms just because of click and imports."}}
{"actor":{"display_login":"nateprewitt"}}