zsh-workers
 help / color / mirror / code / Atom feed
* Zsh start time issues.
@ 2010-12-30 13:48 Yuriy Taraday
  2010-12-31  1:37 ` Phil Pennock
  0 siblings, 1 reply; 2+ messages in thread
From: Yuriy Taraday @ 2010-12-30 13:48 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 462 bytes --]

Hello.

I've recently started using zsh as my default shell. The first bugging thing
is that it takes really long to start zsh. On MacOS X it takes about 6
seconds to start. When connecting to my FreeBSD server (where I set zsh as
my default shell too) it takes about 35 seconds to see shell prompt.
On FreeBSD I have clean install from ports, on MacOS I set up zsh-templates.
Are there any way to find out what's taking so much time?

Thanks in advance, Yuriy.

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

* Re: Zsh start time issues.
  2010-12-30 13:48 Zsh start time issues Yuriy Taraday
@ 2010-12-31  1:37 ` Phil Pennock
  0 siblings, 0 replies; 2+ messages in thread
From: Phil Pennock @ 2010-12-31  1:37 UTC (permalink / raw)
  To: Yuriy Taraday; +Cc: zsh-workers

On 2010-12-30 at 16:48 +0300, Yuriy Taraday wrote:
> Hello.
> 
> I've recently started using zsh as my default shell. The first bugging thing
> is that it takes really long to start zsh. On MacOS X it takes about 6
> seconds to start. When connecting to my FreeBSD server (where I set zsh as
> my default shell too) it takes about 35 seconds to see shell prompt.
> On FreeBSD I have clean install from ports, on MacOS I set up zsh-templates.
> Are there any way to find out what's taking so much time?

35 seconds sounds like there's a 30 second DNS timeout involved, from
sshd, before zsh is even involved.  sshd_config "UseDNS no" if there's
no reverse DNS for your source IP, to keep sshd from stalling while it
tries to figure out who you are?

The first file read by zsh is /etc/zshenv (or some variant thereof,
depending upon install options).  The second is ~/.zshenv.

My ~/.zshenv starts with:
----------------------------8< cut here >8------------------------------
[[ -n $TRACE_ZSH_PROF ]] && zmodload -i zsh/zprof
[[ -n $TRACE_ZSH_TIME ]] && PS4='+[%D{%M:%S}]%N:%i> '
if [[ -n $TRACE_ZSH ]]; then
        [[ -n "$TRACE_ZSH_FILE" ]] && exec 2> "${TRACE_ZSH_FILE}"
        setopt xtrace
fi
----------------------------8< cut here >8------------------------------

You can then modify /etc/ssh/sshd_config to include:
  AcceptEnv TRACE_ZSH*

You can then export some environment variables to the ssh command to get
a trace of everything that happens, from ~/.zshenv onwards.  You might
need a SendEnv in the client SSH config too.

-Phil


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

end of thread, other threads:[~2010-12-31  1:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-30 13:48 Zsh start time issues Yuriy Taraday
2010-12-31  1:37 ` Phil Pennock

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).