Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion tricks
- X-seq: zsh-users 3702
- From: Adam Spiers <adam@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: completion tricks
- Date: Tue, 20 Mar 2001 14:57:46 +0000
- In-reply-to: <200103200828.JAA06269@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>; from wischnow@xxxxxxxxxxxxxxxxxxxxxxx on Tue, Mar 20, 2001 at 09:28:29AM +0100
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200103200828.JAA06269@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: Adam Spiers <adam@xxxxxxxxxx>
Sven Wischnowsky (wischnow@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> On a stand-alone Linux box there probably really isn't that much
> difference, but at least for me compiling the whole completion system
> into a memory mapped digest file and using that makes things faster
> (after the first function is loaded). It also saves memory, of course
> because mapped files are shared by all instances of zsh running on the
> same host (if your OS supports that, but almost every Unix should).
Would you mind showing how you do this quickly? I tried:
$ zcompile ~/.zsh/comp.zwc ~/local/share/zsh/4.0.1-pre-2/functions/Completion/*/_*
ripped from the example usage of zrecompile, but I got:
zsh: parse error near `|'
zcompile: can't read file: /nfs-home/adams/local/share/zsh/4.0.1-pre-2/functions/Completion/Builtins/_vars_eq
This is with the latest CVS.
Also, for this to work, wouldn't I have to include ~/.zsh/comp.zwc in
fpath? Why did the example suggest only to compile Completion/*/_*,
not Completion/*/* ?
I get the impression there are several different strategies one could
take with compilation. For example, how much is there to be gained by
replacing all the Completion/* directories from the fpath with a
single compiled foo.zwc digest? Could you even do that, given that
presumably foo.zwc would be missing Completion/Core/comp* ?
The more I think about it, the more I like the idea of `make install'
(or maybe `make install.zwc') taking the most sensible compilation
route. The distribution's completion functions probably aren't going
to change at all in between upgrades, after all.
> > Completing files with TAB was noticeably slower with the new
> > system over the old.
>
> As Adam pointed out, this of course depends on the completers one uses
> (and the match specs, btw.).
Perhaps these performance hits should be mentioned in the manual?
> Anyway. I can't and wouldn't want to force anyone to switch to the
> new system -- but you miss a lot ;-)
You certainly do :-)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author