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

Please optimize loading z-sy-h (time to first prompt in a new shell) #635

Open
zachliu opened this issue Oct 4, 2019 · 7 comments
Open

Comments

@zachliu
Copy link

zachliu commented Oct 4, 2019

I'm all about startup speed, but:

um  calls                time                       self            name
-----------------------------------------------------------------------------------
 1)    1          32.18    32.18   49.28%     32.18    32.18   49.28%  _zsh_highlight_bind_widgets
 2)    1           9.25     9.25   14.16%      9.25     9.25   14.16%  compinit
 3)    1           7.50     7.50   11.48%      6.88     6.88   10.54%  _zsh_highlight_load_highlighters
 4)    8           5.90     0.74    9.03%      5.90     0.74    9.03%  compdef
 5)    1           4.63     4.63    7.10%      4.63     4.63    7.10%  include
 6)    5           2.06     0.41    3.16%      2.06     0.41    3.16%  add-zsh-hook
 7)    4           5.09     1.27    7.79%      1.23     0.31    1.89%  complete
 8)    1           1.15     1.15    1.76%      1.15     1.15    1.76%  is-at-least
 9)    3           0.57     0.19    0.88%      0.57     0.19    0.88%  bashcompinit
10)    5           0.50     0.10    0.76%      0.50     0.10    0.76%  spaceship::deprecated

Any suggestions?

@zachliu zachliu changed the title It constitutes ~60% of my zsh startup time 😿 It constitutes ~60% of my zsh startup time Oct 4, 2019
@zachliu
Copy link
Author

zachliu commented Oct 4, 2019

😿

@danielshahaf
Copy link
Member

Try the features/redrawhook branch.

@doronbehar
Copy link

Hey, just out of curiosity, how did you perform this test?

@danielshahaf
Copy link
Member

Presumably with zprof — it's documented in the zsh manual.

@zachliu
Copy link
Author

zachliu commented Oct 14, 2019

@danielshahaf lowered from ~60% to less than 20% 👍

@danielshahaf
Copy link
Member

Thanks. We should release 0.7.0, merge the branch, and then look into those 20%.

@danielshahaf
Copy link
Member

danielshahaf commented May 22, 2020

Some more analysis in a comment on a recent issue that's a duplicate of this one: #734 (comment)

@danielshahaf danielshahaf changed the title It constitutes ~60% of my zsh startup time Please optimize loading z-sy-h (time to first prompt in a new shell) May 22, 2020
@danielshahaf danielshahaf added this to the 0.9.0 milestone Jul 14, 2020
danielshahaf added a commit that referenced this issue Aug 9, 2020
The parent commit, which merged the feature/redrawhook bug and thereby
closed PR #749, also fixed the following issue:

Fixes #40.

Fixes #90, closes #470. (The latter is a PR for the former.)

Fixes #150, closes #151, closes #160. (The latter two are PR's for the first one.) The related issue #183 appears to have been fixed in master. For #150, a different fix for older versions of zsh was considered but has not been implemented.

Issue #154 was fixed in xsel(1) in 2017. The parent commit probably fixed that issue for pre-2017 xsel(1).

Is #245, #356, and #749. Fixes #245 (redrawhook umbrella issue).

Does not reintroduce #257 (comment).

Does not reintroduce #259 (comment)

Closes #281 as obsolete.

Fixes #295.

Fixes #324.

Fixes #375.

Fixes #377.

Closes #421 as obsolete.

Fixes #520.

Unblocks #536 (already milestoned).

Fixes #632.

Unblocks #635. Milestoned.

Unblocks #688. Milestoned.

Unblocks administrative issue #655 (already milestoned).

(The above is copied from
#749 (comment),
but repeated here for the sake of github's commit-to-issue linking magic.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants