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

zsh is still slow from compaudit/compinit #154

Closed
kachick opened this issue Feb 22, 2023 · 1 comment · Fixed by #155
Closed

zsh is still slow from compaudit/compinit #154

kachick opened this issue Feb 22, 2023 · 1 comment · Fixed by #155

Comments

@kachick
Copy link
Owner

kachick commented Feb 22, 2023

  • zsh: 200ms
  • bash: 40ms
  • fish: 17ms
  • nu: 3ms

🤔

Enabling zprof is below

num  calls                time                       self            name
-----------------------------------------------------------------------------------
num  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    2         124.58    62.29   89.04%    124.58    62.29   89.04%  compaudit
 2)    1         134.02   134.02   95.78%      9.44     9.44    6.74%  compinit
 3)    1           3.41     3.41    2.44%      3.35     3.35    2.40%  _zsh_highlight_load_highlighters
 4)    1           0.91     0.91    0.65%      0.89     0.89    0.64%  _zsh_highlight__function_callable_p
 5)    3           0.63     0.21    0.45%      0.45     0.15    0.32%  add-zle-hook-widget
 6)    1           0.37     0.37    0.26%      0.37     0.37    0.26%  (anon) [/home/kachick/.local/share/sheldon/repos/github.com/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh:458]
 7)    5           0.33     0.07    0.24%      0.33     0.07    0.24%  add-zsh-hook
 8)    4           0.30     0.08    0.22%      0.30     0.08    0.22%  is-at-least
 9)    1           0.18     0.18    0.13%      0.18     0.18    0.13%  (anon) [/nix/store/1p8fx1drd2a8ki8spv0pxbz5bscsp1ix-zsh-5.9/share/zsh/5.9/functions/add-zle-hook-widget:28]
10)    1           0.02     0.02    0.01%      0.02     0.02    0.01%  _zsh_highlight__is_function_p
11)    1           0.00     0.00    0.00%      0.00     0.00    0.00%  __starship_get_time
12)    1           0.00     0.00    0.00%      0.00     0.00    0.00%  _zsh_highlight_bind_widgets

-----------------------------------------------------------------------------------

 2)    1         134.02   134.02   95.78%      9.44     9.44    6.74%  compinit
       1/2       124.58   124.58   89.04%      0.18     0.18             compaudit [1]

-----------------------------------------------------------------------------------

       1/2       124.58   124.58   89.04%      0.18     0.18             compinit [2]
       1/2       124.40   124.40   88.91%    124.40   124.40             compaudit [1]
 1)    2         124.58    62.29   89.04%    124.58    62.29   89.04%  compaudit
       1/2       124.40   124.40   88.91%    124.40   124.40             compaudit [1]

-----------------------------------------------------------------------------------

 3)    1           3.41     3.41    2.44%      3.35     3.35    2.40%  _zsh_highlight_load_highlighters
       1/5         0.05     0.05    0.04%      0.05     0.05             add-zsh-hook [7]

-----------------------------------------------------------------------------------

 4)    1           0.91     0.91    0.65%      0.89     0.89    0.64%  _zsh_highlight__function_callable_p
       1/1         0.02     0.02    0.01%      0.02     0.02             _zsh_highlight__is_function_p [10]

-----------------------------------------------------------------------------------

       1/3         0.09     0.09    0.06%      0.09     0.09             add-zle-hook-widget [5]
 5)    3           0.63     0.21    0.45%      0.45     0.15    0.32%  add-zle-hook-widget
       1/3         0.09     0.09    0.06%      0.09     0.09             add-zle-hook-widget [5]
       1/1         0.18     0.18    0.13%      0.18     0.18             (anon) [/nix/store/1p8fx1drd2a8ki8spv0pxbz5bscsp1ix-zsh-5.9/share/zsh/5.9/functions/add-zle-hook-widget:28] [9]

-----------------------------------------------------------------------------------

bash speed is enough to me, but it can't simply highlight the syntax
nushell has some issues to use.
fish behaves what I want, but it has changed from POSIX...

@kachick
Copy link
Owner Author

kachick commented Feb 22, 2023

Disabling compinit and zsh-syntax-highlighting still slow as 180ms 🤷‍♂️

kachick added a commit that referenced this issue Feb 22, 2023
kachick added a commit that referenced this issue Feb 23, 2023
@kachick kachick mentioned this issue Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant