From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25520 invoked by alias); 1 Jul 2018 17:58:55 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 43124 Received: (qmail 21841 invoked by uid 1010); 1 Jul 2018 17:58:55 -0000 X-Qmail-Scanner-Diagnostics: from 195.159.176.226 by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(195.159.176.226):SA:0(-0.9/5.0):. Processed in 1.58067 secs); 01 Jul 2018 17:58:55 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RDNS_NONE autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: gcszd-zsh-workers@m.gmane.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Martin Vaeth Subject: Huge delay for completions when not sorting Date: Sun, 1 Jul 2018 17:56:28 +0000 (UTC) Message-ID: Reply-To: martin@mvath.de X-Complaints-To: usenet@blaine.gmane.org User-Agent: slrn/1.0.3 (Linux) 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. If the above zstyle is in effect, the completion for the artificial command "2" defined by the completion file #compdef 2 local expl _description a expl a compadd "$expl[@]" - {1..40000} takes ages. Inserting e.g. "touch" commands, it can be verified that the delay happens _after_ the return of the completion function, i.e. it is _not_ the compadd itself which is slow. Moreover, without the _description line there is no delay. If the 40000 is replaced by 10000, the delay "almost" vanishes on my machine. Maybe the "critical" number is different on other systems.