* Speeding up ZSH startup
@ 2005-04-23 6:29 Meino Christian Cramer
2005-04-23 8:54 ` Andrey Borzenkov
0 siblings, 1 reply; 8+ messages in thread
From: Meino Christian Cramer @ 2005-04-23 6:29 UTC (permalink / raw)
To: zsh-users
Hi,
I am at the very beginning of dvinig deeper into the wonderful world
of ZSH :O)...
I want to speed up the start of zsh on my Linux system.
WIth "zsh -x" I figured out what file are loaded when and I found no
abnormal things (reloading and such...). The different fiel, which
got loaded are of "normal" size (so nothing VERY big...).
Is there any other things or tricks I can try to make starting zsh a
little faster ?
For example: Are there feature known, which are better to be
activated at last/at first...
Or...?
Thank you very much for nay hint and advice in advance !
Kind regards and have a nice weekend!
Meino
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Speeding up ZSH startup
2005-04-23 6:29 Speeding up ZSH startup Meino Christian Cramer
@ 2005-04-23 8:54 ` Andrey Borzenkov
2005-04-23 10:26 ` Mads Martin Joergensen
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Andrey Borzenkov @ 2005-04-23 8:54 UTC (permalink / raw)
To: zsh-users; +Cc: Meino Christian Cramer
[-- Attachment #1: Type: text/plain, Size: 1134 bytes --]
On Saturday 23 April 2005 10:29, Meino Christian Cramer wrote:
> Hi,
>
> I am at the very beginning of dvinig deeper into the wonderful world
> of ZSH :O)...
>
> I want to speed up the start of zsh on my Linux system.
> WIth "zsh -x" I figured out what file are loaded when and I found no
> abnormal things (reloading and such...). The different fiel, which
> got loaded are of "normal" size (so nothing VERY big...).
>
> Is there any other things or tricks I can try to make starting zsh a
> little faster ?
>
If you use "new" completion (compinit) then the slowest part is reading and
parsing all completion functions.
You can speed it up by precompiling; see zcompile and function autoloading in
Zsh manuals.
I do something like
for i in $fpath; do
zcompile $i $i/*(N)
done
and wrapper function that checks modification time to automatically recompile
if needed.
> For example: Are there feature known, which are better to be
> activated at last/at first...
>
it depends on your rc files actually. Ubuntu ships zero rc files for zsh and
startup is very fast :)
-andrey
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Speeding up ZSH startup
2005-04-23 8:54 ` Andrey Borzenkov
@ 2005-04-23 10:26 ` Mads Martin Joergensen
2005-04-24 21:02 ` Nikolai Weibull
2005-04-23 16:18 ` Meino Christian Cramer
2005-04-23 23:46 ` Mikael Magnusson
2 siblings, 1 reply; 8+ messages in thread
From: Mads Martin Joergensen @ 2005-04-23 10:26 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: zsh-users, Meino Christian Cramer
* Andrey Borzenkov <arvidjaar@newmail.ru> [Apr 23. 2005 10:55]:
> If you use "new" completion (compinit) then the slowest part is reading and
> parsing all completion functions.
>
> You can speed it up by precompiling; see zcompile and function autoloading in
> Zsh manuals.
Wouldn't it be an idea to precompile all completions when installing
them in the system with make install?
--
Mads Martin Joergensen, http://mmj.dk
"Why make things difficult, when it is possible to make them cryptic
and totally illogical, with just a little bit more effort?"
-- A. P. J.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Speeding up ZSH startup
2005-04-23 10:26 ` Mads Martin Joergensen
@ 2005-04-24 21:02 ` Nikolai Weibull
2005-04-25 16:57 ` Andrey Borzenkov
0 siblings, 1 reply; 8+ messages in thread
From: Nikolai Weibull @ 2005-04-24 21:02 UTC (permalink / raw)
To: zsh-users
Mads Martin Joergensen, April 23:
> * Andrey Borzenkov <arvidjaar@newmail.ru> [Apr 23. 2005 10:55]:
> > You can speed it up by precompiling; see zcompile and function
> > autoloading in Zsh manuals.
> Wouldn't it be an idea to precompile all completions when installing
> them in the system with make install?
How much of a speed-up can be seen from precompiling? Has anyone done
any actual profiling?,
nikolai
--
Nikolai Weibull: now available free of charge at http://bitwi.se/!
Born in Chicago, IL USA; currently residing in Gothenburg, Sweden.
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Speeding up ZSH startup
2005-04-23 8:54 ` Andrey Borzenkov
2005-04-23 10:26 ` Mads Martin Joergensen
@ 2005-04-23 16:18 ` Meino Christian Cramer
2005-04-23 16:22 ` Bart Schaefer
2005-04-23 23:46 ` Mikael Magnusson
2 siblings, 1 reply; 8+ messages in thread
From: Meino Christian Cramer @ 2005-04-23 16:18 UTC (permalink / raw)
To: arvidjaar; +Cc: zsh-users
From: Andrey Borzenkov <arvidjaar@newmail.ru>
Subject: Re: Speeding up ZSH startup
Date: Sat, 23 Apr 2005 12:54:53 +0400
> On Saturday 23 April 2005 10:29, Meino Christian Cramer wrote:
> > Hi,
> >
> > I am at the very beginning of dvinig deeper into the wonderful world
> > of ZSH :O)...
> >
> > I want to speed up the start of zsh on my Linux system.
> > WIth "zsh -x" I figured out what file are loaded when and I found no
> > abnormal things (reloading and such...). The different fiel, which
> > got loaded are of "normal" size (so nothing VERY big...).
> >
> > Is there any other things or tricks I can try to make starting zsh a
> > little faster ?
> >
>
> If you use "new" completion (compinit) then the slowest part is reading and
> parsing all completion functions.
...hmmm
When compiling .zcompdump to .zcompdump.zwc I think it will start a
little faster...but when will .zcompdump be created...and -- as a
logical consequence -- when do I have to recompile it again ?
Is there any automatism? Kinda "Dear ZSH, if you have recently
created .zcompdump...please compile it for me..."
(or am I blinded by too much programming tasks ???)
> You can speed it up by precompiling; see zcompile and function autoloading in
> Zsh manuals.
>
> I do something like
>
> for i in $fpath; do
> zcompile $i $i/*(N)
> done
>
> and wrapper function that checks modification time to automatically recompile
> if needed.
Aha! Sounds good...
> > For example: Are there feature known, which are better to be
> > activated at last/at first...
> >
>
> it depends on your rc files actually. Ubuntu ships zero rc files for zsh and
> startup is very fast :)
Ha!!!
Less features means being fast...isn't it ?
> -andrey
mcc
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Speeding up ZSH startup
2005-04-23 8:54 ` Andrey Borzenkov
2005-04-23 10:26 ` Mads Martin Joergensen
2005-04-23 16:18 ` Meino Christian Cramer
@ 2005-04-23 23:46 ` Mikael Magnusson
2 siblings, 0 replies; 8+ messages in thread
From: Mikael Magnusson @ 2005-04-23 23:46 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: zsh-users, Meino Christian Cramer
sorry if gmail messes up the To: and Cc: here...
On 4/23/05, Andrey Borzenkov <arvidjaar@newmail.ru> wrote:
> On Saturday 23 April 2005 10:29, Meino Christian Cramer wrote:
> > Hi,
> >
> > I am at the very beginning of dvinig deeper into the wonderful world
> > of ZSH :O)...
> >
> > I want to speed up the start of zsh on my Linux system.
> > WIth "zsh -x" I figured out what file are loaded when and I found no
> > abnormal things (reloading and such...). The different fiel, which
> > got loaded are of "normal" size (so nothing VERY big...).
> >
> > Is there any other things or tricks I can try to make starting zsh a
> > little faster ?
> >
>
> If you use "new" completion (compinit) then the slowest part is reading and
> parsing all completion functions.
>
> You can speed it up by precompiling; see zcompile and function autoloading in
> Zsh manuals.
>
> I do something like
>
> for i in $fpath; do
> zcompile $i $i/*(N)
> done
I have this function that i call from time to time manually as root
and my user (the one for my user doesn't have the systemwide files),
src () {
autoload -U zrecompile
[ -f ~/.zshrc ] && zrecompile -p ~/.zshrc
[ -f ~/.zlogout ] && zrecompile -p ~/.zlogout
[ -f ~/.zlogin ] && zrecompile -p ~/.zlogin
[ -f ~/.zcompdump ] && zrecompile -p ~/.zcompdump
[ -f /etc/profile ] && zrecompile -p /etc/profile
[ -f /etc/profile.env ] && zrecompile -p /etc/profile.env
for a in $fpath
do
[ -d $a ] && zrecompile -p $a.zwc $a/*
done
}
> and wrapper function that checks modification time to automatically recompile
> if needed.
>
> > For example: Are there feature known, which are better to be
> > activated at last/at first...
> >
>
> it depends on your rc files actually. Ubuntu ships zero rc files for zsh and
> startup is very fast :)
>
> -andrey
>
>
>
--
Mikael Magnusson
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-04-25 16:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-23 6:29 Speeding up ZSH startup Meino Christian Cramer
2005-04-23 8:54 ` Andrey Borzenkov
2005-04-23 10:26 ` Mads Martin Joergensen
2005-04-24 21:02 ` Nikolai Weibull
2005-04-25 16:57 ` Andrey Borzenkov
2005-04-23 16:18 ` Meino Christian Cramer
2005-04-23 16:22 ` Bart Schaefer
2005-04-23 23:46 ` Mikael Magnusson
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).