Is it a good idea to call compinit from the global zshrc without warning?

Asked by Daniel Light

Calling compinit multiple times during startup is not advised, and can lead to slowdowns (in my case, it takes zsh startup from ~40ms to ~1900ms). Presently the packaged zshrc calls compinit unless $skip_global_compinit is set. However, it's not obvious that this is the case - it took me quite some time (several months of vaguely wondering what was wrong and occasionally googling, plus about half an hour in #zsh on freenode) to figure out that this was the culprit and disable it.

I can see the use of calling compinit in the global zshrc - it's probably helpful to people who happen to be running zsh but have never customized it. But for people who are customizing, it's most common for them to configure the fpath (to enable additional completions) and call compinit in their zshrc, after this is already done.

As such, if it's desirable to run compinit in /etc/zsh/zshrc, I think it might be worthwhile to redefine compinit to print a message describing this issue and then calling through to compinit, since this has such an adverse impact on shell responsivity.

I'm not sure what the best way to bring this up with the package maintainer, though - on https://packages.ubuntu.com/bionic/zsh it lists the package maintainer as ubuntu developers, but I'm not sure if it's appropriate to bring something like this up on <email address hidden>.

So I'd appreciate if someone could point me in the right direction to have a discussion on this topic.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu zsh Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.