Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Huge delay for completions when not sorting
- X-seq: zsh-workers 43128
- From: dana <dana@xxxxxxx>
- To: martin@xxxxxxxx
- Subject: Re: Huge delay for completions when not sorting
- Date: Sun, 1 Jul 2018 15:38:54 -0500
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zVhZj+mXZs/D0VuF/RVVRs1B4Da0UnbULOBP70dGcAs=; b=WJiywKG/5KZFx3aSI2Czp1Z7jCxveqpGBYmC6Vno2bX5DgcnSh7GUNpYmPxJ14KqNM cycJ+pfRvHr9J9TIMacd3OeeLZ+lKh2tqk4Pupl4YSbMEWyUrVc4cNyrZ177wUCeVRt+ LoMtY1CkV4Du8Pyus5tZnlx4RY4m/mDpTXfwhFZvEzIPhFAFtmDUP2Y47FvKoFiR8c0f +Mz0HOQr8WWX+iHF8lt7vi2LZNPSmTV+tZMZNR7+HTkhb3/0DeIDzXxElIsZ5+4LBqja ifRtkFGyWU3wjAIg03lWxD9ENnsXFG1tO+jqgzgTe7nOQEgTWk5QUIlVE/P5HWz9MKUg u9Rg==
- In-reply-to: <slrnpji5if.45o.martin@clover.invalid>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <slrnpji5if.45o.martin@clover.invalid>
On 1 Jul 2018, at 12:56, Martin Vaeth <martin@xxxxxxxx> wrote:
>I would have expected that the line
>
>zstyle ':completion:*' sort false
>
>speeds things up if there is a huge number of completions.
>However, quite the opposite is true.
It's to do with the way it checks for duplicates in the unsorted results (-V
without -1 or -2). For each completion possibility, it performs a series of
checks against every subsequent possibility (compcore.c @ 3239)
I'm pretty bad at maths, but i think that for 40'000 unique possibilities it'll
have to make, like, 800 million calls to strcmp()
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author