zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: Slow completion
Date: Mon, 11 Mar 2013 09:21:19 -0700	[thread overview]
Message-ID: <130311092119.ZM15517@torch.brasslantern.com> (raw)
In-Reply-To: <CAHjjW143Gm75mRkzB2H3EwDpOmQBuC4_aLFNLFkKsUGCUmN1SA@mail.gmail.com>

On Mar 8, 10:45am, joe M wrote:
} 
} I am wondering if there would be any benefit in compiling the
} completion functions such as _main_complete, etc. Will that show a
} performance boost?

Nobody answered this, I guess.  The answer is complicated.

Although .zwc requires less parsing/interpretation than plain text, it's
often larger on disk because of storing both the bytecode and the raw
strings for xtrace.  On the other hand it doesn't include comments, so
heavily-commented functions might come out smaller.

It is probably not a win to compile all the functions into a single .zwc
file because most people don't use anywhere near the entire suite, so
you'll be loading a bunch of stuff you don't need.  The flip side of
this is that zsh is usually able to memory-map the whole .zwc file,
which is probably faster than reading individual small files, so it may
be a wash.

Whether there's a benefit to selectively compiling the parts that you do
use is system-dependent, and again is related to the file sizes.  If you
have fast disk I/O it may be a win (when zcompile was invented I/O was
consistently faster than parsing) but on say a laptop that does not have
SSD you may be better off parsing on the fly.

The best I can offer is, try it both ways and compare.


      reply	other threads:[~2013-03-11 16:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-06 21:40 Thorsten Kampe
2013-03-07 10:22 ` Peter Stephenson
2013-03-07 11:44   ` Mikael Magnusson
2013-03-07 12:08     ` Peter Stephenson
2013-03-07 16:04 ` Bart Schaefer
2013-03-07 20:33   ` Thorsten Kampe
2013-03-07 23:38   ` Oliver Kiddle
2013-03-08 15:45     ` joe M
2013-03-11 16:21       ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=130311092119.ZM15517@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).