zsh-users
 help / color / mirror / code / Atom feed
* Zsh startup really slow after upgrade to fedora 15
@ 2011-09-05 17:26 Renato Botelho
  2011-09-05 20:28 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Renato Botelho @ 2011-09-05 17:26 UTC (permalink / raw)
  To: zsh-users

Hello,

I've been using zsh for some years, first on FreeBSD and MacOSX, and now
on Linux.

After I upgrade my fedora 14 to 15, it became incredibly slow to open a new
terminal, follow my .zshrc, without comments:

export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin:~/bin
export LC_COLLATE=C
zstyle -e ':completion:*:approximate:*' max-errors \
        'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'
zstyle ':completion:*:expand:*' tag-order all-expansions
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
zstyle ':completion:*' group-name ''
[ -r ~/.ssh/known_hosts ] &&
_ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\
*}%%,*}) || _ssh_hosts=()
[ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s:
:)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}}
|| _etc_hosts=()
hosts=(
  "$_ssh_hosts[@]"
  "$_etc_hosts[@]"
  `hostname`
  localhost
)
zstyle ':completion:*:hosts' hosts $hosts
zstyle ':completion:*' special-dirs true
zstyle ':completion:*' accept-exact '*(N)'
zstyle ':completion:*' use-cache on
zstyle ':completion:*' matcher-list 'm:{# a-z}={# A-Z}'
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args'
zstyle '*' hosts $hosts
zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o'
'*?.c~' '*?.old' '*?.pro'
autoload -U compinit
compinit
typeset -ga preexec_functions
typeset -ga precmd_functions
typeset -ga chpwd_functions
HISTFILE=~/.histfile
HISTSIZE=5000
SAVEHIST=1000
export LISTMAX=1000
export EDITOR=vim
export NULLFS=1
export JAIL=/var/jail/data
export GPG_TTY=`tty`
bindkey -v
bindkey -M vicmd "j" history-search-forward
bindkey -M vicmd "k" history-search-backward
bindkey "^[[A" history-search-backward
bindkey "^[[B" history-search-forward
bindkey -M viins "^[[S" insert-last-word
bindkey -M viins "^[[18~" insert-last-word
alias more='less'
alias ftp='ncftp'
alias j='jobs -l'
alias ff='find ./ -iname $*'
alias ps='ps auxww'
alias l='ls -lF'
alias ls='ls -F'
alias vi='vim'
alias l.='ls -dF .*'
alias gvim="/usr/bin/gvim -geom 145x60 -font \"Terminus 7\""
alias ...='cd ../..'
alias sbp='ssh -l bpuser $*'
alias sgn='ssh -l gnuser $*'
alias x='startx >&! /tmp/x.out $*'
alias ssh-kr='ssh-keygen -R $*'
alias vless='vim -u /usr/local/share/vim/vim*/macros/less.vim'
alias pasteplain='wgetpaste -s pocoo -X -l "Plain Text" $*'
alias pastec='wgetpaste -s pocoo -X -l "C" $*'
alias pastediff='wgetpaste -s pocoo -X -l "Unified Diff" $*'
alias dcvs='env CVS_RSH=ssh cvs -d garga@dcvs.FreeBSD.org:/home/dcvs'
alias pcvs='env CVS_RSH=ssh cvs -d garga@pcvs.FreeBSD.org:/home/pcvs'
alias projcvs='env CVS_RSH=ssh cvs -d garga@projcvs.FreeBSD.org:/home/projcvs'
alias scvs='env CVS_RSH=ssh cvs -d garga@ncvs.FreeBSD.org:/home/ncvs'
alias bpcvs='env CVS_RSH=ssh CVS_SERVER="env TMPDIR=/share/cvs/tmp
cvs" cvs -d garga@tools:/share/cvs/BluePex'
alias btcvs='CVS_RSH=ssh && cvs -d garga@cvs:/share/cvs/BlueTest'
alias tcvs='CVS_RSH=ssh && cvs -d garga@cvs:/share/cvs/bptools'
if [ "$LOGNAME" = "root" ]; then
        alias mutt='mutt -y'
fi
for f in lp lpq lpr lprm; do
        [ -f /usr/local/bin/${f} ] \
                && alias ${f}="/usr/local/bin/$f \$*"
done
setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" }  # csh compatibility
freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done }
git_prompt_info() {
        ref=$(/usr/bin/git symbolic-ref HEAD 2> /dev/null) || return
        echo "(${ref#refs/heads/})"
}
PROMPT='%n@%B%m%b:%(#.%/#.%~>) '
RPROMPT='%B$(git_prompt_info)%b'
setopt   notify pushdtohome cdablevars autolist
setopt   autocd longlistjobs NO_BEEP braceccl
setopt   autoresume histignoredups pushdsilent noclobber
setopt   autopushd pushdminus extendedglob rcquotes mailwarning
setopt   printexitvalue prompt_subst
unsetopt bgnice autoparamslash listambiguous globdots recexact
case $TERM in
        xterm*|rxvt*|rxvt-256color*)
                precmd () { print -Pn "\e]0;%n@%m: %~\a"}
                ;;
esac
[ -x /usr/bin/fortune ] && \
        /usr/bin/fortune -s && \
        echo ""

Is there anything i can do to make it startup faster? Am I missing something
obvious?

Let me know if you need more data from my environment.

Regards
-- 
Renato Botelho


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Zsh startup really slow after upgrade to fedora 15
  2011-09-05 17:26 Zsh startup really slow after upgrade to fedora 15 Renato Botelho
@ 2011-09-05 20:28 ` Bart Schaefer
  2011-09-05 20:35   ` Mikael Magnusson
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2011-09-05 20:28 UTC (permalink / raw)
  To: zsh-users

On Sep 5,  2:26pm, Renato Botelho wrote:
}
} After I upgrade my fedora 14 to 15, it became incredibly slow to open
} a new terminal [...]
}
} Is there anything i can do to make it startup faster? Am I missing
} something obvious?

Nothing jumps out.  Does it take a long time only when opening a
terminal, or does it also take a long time if you just run "zsh" (or
also try "zsh -l") from the command line of an existing terminal?

If it's slow in one of those circumstances, run again with the -x
option and look for delays.

Fedora does appear to have upgraded from 4.3.10 to 4.3.11 with F15.
I wouldn't have expected that by itself to make a difference but it
is possible that the shell startup is now loading more or different
/etc/profile.d stuff.

You might try some of the startup-time suggestions made recently on
this list, such as "unsetopt hashcmds hashdirs" in your ~/.zshenv to
put off scanning everything in your $path.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Zsh startup really slow after upgrade to fedora 15
  2011-09-05 20:28 ` Bart Schaefer
@ 2011-09-05 20:35   ` Mikael Magnusson
  2011-09-05 20:56     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Mikael Magnusson @ 2011-09-05 20:35 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

We solved this on irc, it turned out to be that group lookup thing in
compaudit you fixed/worked around the other week. I asked him to send
a followup mail but i guess he didn't get around to it yet.

On 5 September 2011 22:28, Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Sep 5,  2:26pm, Renato Botelho wrote:
> }
> } After I upgrade my fedora 14 to 15, it became incredibly slow to open
> } a new terminal [...]
> }
> } Is there anything i can do to make it startup faster? Am I missing
> } something obvious?
>
> Nothing jumps out.  Does it take a long time only when opening a
> terminal, or does it also take a long time if you just run "zsh" (or
> also try "zsh -l") from the command line of an existing terminal?
>
> If it's slow in one of those circumstances, run again with the -x
> option and look for delays.
>
> Fedora does appear to have upgraded from 4.3.10 to 4.3.11 with F15.
> I wouldn't have expected that by itself to make a difference but it
> is possible that the shell startup is now loading more or different
> /etc/profile.d stuff.
>
> You might try some of the startup-time suggestions made recently on
> this list, such as "unsetopt hashcmds hashdirs" in your ~/.zshenv to
> put off scanning everything in your $path.
>



-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Zsh startup really slow after upgrade to fedora 15
  2011-09-05 20:35   ` Mikael Magnusson
@ 2011-09-05 20:56     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2011-09-05 20:56 UTC (permalink / raw)
  To: zsh-users

On Sep 5, 10:35pm, Mikael Magnusson wrote:
}
} We solved this on irc, it turned out to be that group lookup thing in
} compaudit you fixed/worked around the other week

Curious that upgrading to Fedora 15 would cause that.  I would expect
it only to occur in a networked environment.  It is possible that F15
has the networked version of getent enabled by default now, and the
long delay is because it's waiting for a connection to a non-existent
server to time out?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-05 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-05 17:26 Zsh startup really slow after upgrade to fedora 15 Renato Botelho
2011-09-05 20:28 ` Bart Schaefer
2011-09-05 20:35   ` Mikael Magnusson
2011-09-05 20:56     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).