From: Romain Francoise <rfrancoise@debian.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh-workers@sunsite.dk, 468386@bugs.debian.org
Subject: Re: Bug#468386: zsh-beta: Slow command completion
Date: Sun, 02 Mar 2008 16:07:32 +0100 [thread overview]
Message-ID: <87bq5xupu3.fsf@elegiac.orebokech.com> (raw)
In-Reply-To: <080228095414.ZM15685@torch.brasslantern.com> (Bart Schaefer's message of "Thu, 28 Feb 2008 09:54:14 -0800")
Hi Bart,
Bart Schaefer <schaefer@brasslantern.com> writes:
> The workaround for Romain is probably to enable caching of the output
> by creating a cache-policy style for :completion::complete:-command-::
> context.
Even after enabling the cache it's still unbearably slow on my
machine (_path_commands already defines a cache-policy style).
Each completion takes about two seconds.
oprofile reports the following:
| CPU: Core 2, speed 1600 MHz (estimated)
| Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with
| a unit mask of 0x00 (Unhalted core cycles) count 100000
| samples % symbol name
| 11356 31.2528 ztrdup
| 5635 15.5080 zalloc
| 3244 8.9278 .plt
| 2766 7.6123 setarrvalue
| 1942 5.3446 zhalloc
| 1460 4.0181 arrlen
| 1457 4.0098 freearray
Which suggests that most of the time is spent building the arrays
fed to compadd and/or formatting $descs w/ zformat. AIUI, before
your change for 24570 most of the contents of $commands were being
thrown away, and it's no longer the case.
It matters since the array is quite large, $commands has 3901
elements here, 2805 of which have descriptions:
$ echo $#_command_descriptions
2805
$ stat -c %s ~/.zsh/command-descriptions
145962
$
--
Romain Francoise <rfrancoise@debian.org>
http://people.debian.org/~rfrancoise/
next prev parent reply other threads:[~2008-03-02 15:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87zltldnde.fsf@elegiac.orebokech.com>
2008-02-28 17:27 ` Clint Adams
2008-02-28 17:54 ` Bart Schaefer
2008-03-02 15:07 ` Romain Francoise [this message]
2008-03-02 18:32 ` Bart Schaefer
2008-03-02 19:29 ` Romain Francoise
2008-03-02 20:52 ` Bart Schaefer
2008-03-02 21:46 ` Clint Adams
2008-03-02 22:45 ` Bart Schaefer
2008-03-02 23:02 ` Clint Adams
2008-03-03 1:24 ` Bart Schaefer
2008-03-03 15:46 ` Oliver Kiddle
2008-02-28 17:54 ` Peter Stephenson
2008-02-28 18:24 ` Clint Adams
2008-02-29 1:11 ` Bart Schaefer
2008-02-29 2:07 ` Clint Adams
2008-02-29 17:12 ` Bart Schaefer
2008-03-01 23:06 ` Clint Adams
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=87bq5xupu3.fsf@elegiac.orebokech.com \
--to=rfrancoise@debian.org \
--cc=468386@bugs.debian.org \
--cc=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/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).