{"action":"created","issue":{"url":"https://api.github.com/repos/zsh-users/antigen/issues/116","repository_url":"https://api.github.com/repos/zsh-users/antigen","labels_url":"https://api.github.com/repos/zsh-users/antigen/issues/116/labels{/name}","comments_url":"https://api.github.com/repos/zsh-users/antigen/issues/116/comments","events_url":"https://api.github.com/repos/zsh-users/antigen/issues/116/events","html_url":"https://github.com/zsh-users/antigen/issues/116","id":60760341,"number":116,"title":"Starting zsh with antigen is very slow","user":{"login":"hobarrera","id":730811,"avatar_url":"https://avatars.githubusercontent.com/u/730811?v=3","gravatar_id":"","url":"https://api.github.com/users/hobarrera","html_url":"https://github.com/hobarrera","followers_url":"https://api.github.com/users/hobarrera/followers","following_url":"https://api.github.com/users/hobarrera/following{/other_user}","gists_url":"https://api.github.com/users/hobarrera/gists{/gist_id}","starred_url":"https://api.github.com/users/hobarrera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hobarrera/subscriptions","organizations_url":"https://api.github.com/users/hobarrera/orgs","repos_url":"https://api.github.com/users/hobarrera/repos","events_url":"https://api.github.com/users/hobarrera/events{/privacy}","received_events_url":"https://api.github.com/users/hobarrera/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/zsh-users/antigen/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-03-12T02:08:40Z","updated_at":"2016-04-14T18:46:09Z","closed_at":null,"body":"I looked at #28 before reporting this, and it *does* pretty much look like antigen is the issue here.\r\n\r\nI've measured the startup time using `zprof`:\r\n\r\n```\r\nnum  calls                time                       self            name\r\n-----------------------------------------------------------------------------------\r\n 1)    9         305.97    34.00   40.28%    305.97    34.00   40.28%  -antigen-ensure-repo\r\n 2)    9         758.77    84.31   99.89%    304.34    33.82   40.07%  antigen-bundle\r\n 3)    9         148.46    16.50   19.55%    129.00    14.33   16.98%  -antigen-load\r\n 4)    1           8.00     8.00    1.05%      8.00     8.00    1.05%  _zsh_highlight_bind_widgets\r\n 5)    2           7.26     3.63    0.96%      7.26     3.63    0.96%  grep-flag-available\r\n 6)    1           2.56     2.56    0.34%      2.56     2.56    0.34%  _zsh_highlight_load_highlighters\r\n 7)    1           1.28     1.28    0.17%      1.28     1.28    0.17%  colors\r\n 8)    9         759.50    84.39   99.99%      0.69     0.08    0.09%  antigen\r\n 9)    1           0.37     0.37    0.05%      0.37     0.37    0.05%  add-zsh-hook\r\n10)    2           0.07     0.03    0.01%      0.07     0.03    0.01%  -set-default\r\n11)    1           0.09     0.09    0.01%      0.02     0.02    0.00%  -antigen-env-setup\r\n12)    1          96.79    96.79   12.74%      0.02     0.02    0.00%  antigen-theme\r\n13)    1         137.30   137.30   18.08%      0.01     0.01    0.00%  antigen-use\r\n14)    1         137.29   137.29   18.07%      0.01     0.01    0.00%  -antigen-use-oh-my-zsh\r\n15)    1           0.01     0.01    0.00%      0.01     0.01    0.00%  compdef\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n 8)    9         759.50    84.39   99.99%      0.69     0.08    0.09%  antigen\r\n       1/1        96.79    96.79   12.74%      0.02     0.02             antigen-theme [12]\r\n       1/1       137.30   137.30   18.08%      0.01     0.01             antigen-use [13]\r\n       7/9       524.72    74.96   69.08%    195.16    27.88             antigen-bundle [2]\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       7/9       524.72    74.96   69.08%    195.16    27.88             antigen [8]\r\n       1/9       137.28   137.28   18.07%     50.53    50.53             -antigen-use-oh-my-zsh [14]\r\n       1/9        96.78    96.78   12.74%     58.64    58.64             antigen-theme [12]\r\n 2)    9         758.77    84.31   99.89%    304.34    33.82   40.07%  antigen-bundle\r\n       9/9       148.46    16.50   19.55%    129.00    14.33             -antigen-load [3]\r\n       9/9       305.97    34.00   40.28%    305.97    34.00             -antigen-ensure-repo [1]\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       9/9       305.97    34.00   40.28%    305.97    34.00             antigen-bundle [2]\r\n 1)    9         305.97    34.00   40.28%    305.97    34.00   40.28%  -antigen-ensure-repo\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       9/9       148.46    16.50   19.55%    129.00    14.33             antigen-bundle [2]\r\n 3)    9         148.46    16.50   19.55%    129.00    14.33   16.98%  -antigen-load\r\n       1/1         0.37     0.37    0.05%      0.37     0.37             add-zsh-hook [9]\r\n       1/1         1.28     1.28    0.17%      1.28     1.28             colors [7]\r\n       1/1         2.56     2.56    0.34%      2.56     2.56             _zsh_highlight_load_highlighters [6]\r\n       2/2         7.26     3.63    0.96%      7.26     3.63             grep-flag-available [5]\r\n       1/1         8.00     8.00    1.05%      8.00     8.00             _zsh_highlight_bind_widgets [4]\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       1/1       137.30   137.30   18.08%      0.01     0.01             antigen [8]\r\n13)    1         137.30   137.30   18.08%      0.01     0.01    0.00%  antigen-use\r\n       1/1       137.29   137.29   18.07%      0.01     0.01             -antigen-use-oh-my-zsh [14]\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       1/1       137.29   137.29   18.07%      0.01     0.01             antigen-use [13]\r\n14)    1         137.29   137.29   18.07%      0.01     0.01    0.00%  -antigen-use-oh-my-zsh\r\n       1/9       137.28   137.28   18.07%     50.53    50.53             antigen-bundle [2]\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       1/1        96.79    96.79   12.74%      0.02     0.02             antigen [8]\r\n12)    1          96.79    96.79   12.74%      0.02     0.02    0.00%  antigen-theme\r\n       1/9        96.78    96.78   12.74%     58.64    58.64             antigen-bundle [2]\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       1/1         8.00     8.00    1.05%      8.00     8.00             -antigen-load [3]\r\n 4)    1           8.00     8.00    1.05%      8.00     8.00    1.05%  _zsh_highlight_bind_widgets\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       2/2         7.26     3.63    0.96%      7.26     3.63             -antigen-load [3]\r\n 5)    2           7.26     3.63    0.96%      7.26     3.63    0.96%  grep-flag-available\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       1/1         2.56     2.56    0.34%      2.56     2.56             -antigen-load [3]\r\n 6)    1           2.56     2.56    0.34%      2.56     2.56    0.34%  _zsh_highlight_load_highlighters\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       1/1         1.28     1.28    0.17%      1.28     1.28             -antigen-load [3]\r\n 7)    1           1.28     1.28    0.17%      1.28     1.28    0.17%  colors\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       1/1         0.37     0.37    0.05%      0.37     0.37             -antigen-load [3]\r\n 9)    1           0.37     0.37    0.05%      0.37     0.37    0.05%  add-zsh-hook\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n11)    1           0.09     0.09    0.01%      0.02     0.02    0.00%  -antigen-env-setup\r\n       1/1         0.01     0.01    0.00%      0.01     0.01             compdef [15]\r\n       2/2         0.07     0.03    0.01%      0.07     0.03             -set-default [10]\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       2/2         0.07     0.03    0.01%      0.07     0.03             -antigen-env-setup [11]\r\n10)    2           0.07     0.03    0.01%      0.07     0.03    0.01%  -set-default\r\n\r\n-----------------------------------------------------------------------------------\r\n\r\n       1/1         0.01     0.01    0.00%      0.01     0.01             -antigen-env-setup [11]\r\n15)    1           0.01     0.01    0.00%      0.01     0.01    0.00%  compdef\r\n```\r\n\r\nHere my `.zshrc`:\r\n\r\n```\r\nzmodload zsh/zprof\r\nexport ADOTDIR=$HOME/.cache/antigen\r\nsource $HOME/.local/opt/antigen/antigen.zsh\r\n\r\n# oh-my-zsh settings:\r\nCASE_SENSITIVE=\"true\"\r\n# Do I still need this?\r\n# DISABLE_AUTO_UPDATE=\"true\"\r\n\r\n# Load the oh-my-zsh's library.\r\nantigen use oh-my-zsh\r\n\r\n# Bundles from oh-my-zsh.\r\nantigen bundle pass\r\nantigen bundle sprunge\r\nantigen bundle gpg-agent\r\nantigen bundle ssh-agent\r\nantigen bundle wd\r\nantigen bundle virtualenv\r\n\r\n# Syntax highlighting bundle.\r\nantigen bundle zsh-users/zsh-syntax-highlighting\r\n\r\nantigen theme hobarrera/zhob zhob\r\n\r\n# antigen apply\r\n\r\nsource $HOME/.config/sh/exports.sh\r\nsource $HOME/.config/sh/aliases.sh\r\n\r\nautoload zmv\r\nautoload zcalc\r\n\r\nzprof | xclip\r\nexit\r\n# Commented for testing antigen slowness:\r\n# if [[ -z $TMUX && -z $SSH_CLIENT ]]; then\r\n#   exec tmux -f $HOME/.config/tmux/tmux.conf\r\n# fi\r\n```\r\n\r\nFinally:\r\n```\r\ntime zsh\r\nzsh  0.39s user 0.28s system 85% cpu 0.791 total\r\n```\r\n\r\nI tried getting rid of plugins, but merely keeping the first four plugins (eg, adding `exit` after `ssh-agent`) still kept the time to > 500ms.\r\n\r\nUsing latest antigen from git:\r\n```\r\ngit rev-parse --short HEAD\r\n30098c1\r\n```"},"comment":{"url":"https://api.github.com/repos/zsh-users/antigen/issues/comments/210094855","html_url":"https://github.com/zsh-users/antigen/issues/116#issuecomment-210094855","issue_url":"https://api.github.com/repos/zsh-users/antigen/issues/116","id":210094855,"user":{"login":"blairham","id":5043780,"avatar_url":"https://avatars.githubusercontent.com/u/5043780?v=3","gravatar_id":"","url":"https://api.github.com/users/blairham","html_url":"https://github.com/blairham","followers_url":"https://api.github.com/users/blairham/followers","following_url":"https://api.github.com/users/blairham/following{/other_user}","gists_url":"https://api.github.com/users/blairham/gists{/gist_id}","starred_url":"https://api.github.com/users/blairham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blairham/subscriptions","organizations_url":"https://api.github.com/users/blairham/orgs","repos_url":"https://api.github.com/users/blairham/repos","events_url":"https://api.github.com/users/blairham/events{/privacy}","received_events_url":"https://api.github.com/users/blairham/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T18:46:09Z","updated_at":"2016-04-14T18:46:09Z","body":"Sadly I agree with @outcoldman. This is a dead project. I ended up forking it and merging this in my fork for now"}}