{"action":"created","issue":{"url":"https://api.github.com/repos/creationix/nvm/issues/781","repository_url":"https://api.github.com/repos/creationix/nvm","labels_url":"https://api.github.com/repos/creationix/nvm/issues/781/labels{/name}","comments_url":"https://api.github.com/repos/creationix/nvm/issues/781/comments","events_url":"https://api.github.com/repos/creationix/nvm/issues/781/events","html_url":"https://github.com/creationix/nvm/issues/781","id":93922521,"number":781,"title":"Shell startup can be improved by not printing npm version when sourcing nvm.sh","user":{"login":"alanmquach","id":1633736,"avatar_url":"https://avatars.githubusercontent.com/u/1633736?v=3","gravatar_id":"","url":"https://api.github.com/users/alanmquach","html_url":"https://github.com/alanmquach","followers_url":"https://api.github.com/users/alanmquach/followers","following_url":"https://api.github.com/users/alanmquach/following{/other_user}","gists_url":"https://api.github.com/users/alanmquach/gists{/gist_id}","starred_url":"https://api.github.com/users/alanmquach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alanmquach/subscriptions","organizations_url":"https://api.github.com/users/alanmquach/orgs","repos_url":"https://api.github.com/users/alanmquach/repos","events_url":"https://api.github.com/users/alanmquach/events{/privacy}","received_events_url":"https://api.github.com/users/alanmquach/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/creationix/nvm/labels/performance","name":"performance","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":34,"created_at":"2015-07-09T00:42:24Z","updated_at":"2016-07-22T12:22:32Z","closed_at":null,"body":"I found that the slowest part (0.5s, so not horrible) of my shell startup was sourcing nvm.sh so out of curiosity, I dove in to see what it was spending all it's time doing.\r\n\r\nWhile considerable time is spent in:\r\n* `nvm_version`\r\n* `nvm_ensure_version_installed`\r\n\r\nThey're at least doing useful work. Also `nvm_ensure_version_installed` has already been flagged as a possible optimization.\r\n\r\nI almost overlooked the `echo` statements at the end but found that `nvm_print_npm_version` takes just as much time as the heavy hitters above, all just to print the npm version (presumably because it calls out to `npm --version`). Moreover, while this might be useful info, it certainly isn't when it gets `>/dev/null`ed as it does in the shell startup case.\r\n\r\nOpened #780 for this. Not sure if it's the cleanest but that's the idea. I'd be happy to implement it in a cleaner way needed."},"comment":{"url":"https://api.github.com/repos/creationix/nvm/issues/comments/234529645","html_url":"https://github.com/creationix/nvm/issues/781#issuecomment-234529645","issue_url":"https://api.github.com/repos/creationix/nvm/issues/781","id":234529645,"user":{"login":"eladnava","id":4394189,"avatar_url":"https://avatars.githubusercontent.com/u/4394189?v=3","gravatar_id":"","url":"https://api.github.com/users/eladnava","html_url":"https://github.com/eladnava","followers_url":"https://api.github.com/users/eladnava/followers","following_url":"https://api.github.com/users/eladnava/following{/other_user}","gists_url":"https://api.github.com/users/eladnava/gists{/gist_id}","starred_url":"https://api.github.com/users/eladnava/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eladnava/subscriptions","organizations_url":"https://api.github.com/users/eladnava/orgs","repos_url":"https://api.github.com/users/eladnava/repos","events_url":"https://api.github.com/users/eladnava/events{/privacy}","received_events_url":"https://api.github.com/users/eladnava/received_events","type":"User","site_admin":false},"created_at":"2016-07-22T12:22:32Z","updated_at":"2016-07-22T12:22:32Z","body":"Someone wrote a blog post about a workaround for this:\r\nhttp://broken-by.me/lazy-load-nvm/?utm_source=nodeweekly&utm_medium=email"}}
{"actor":{"display_login":"eladnava"}}