From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9058 invoked by alias); 1 Jul 2018 20:39:01 -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: 43128 Received: (qmail 5902 invoked by uid 1010); 1 Jul 2018 20:39:01 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f45.google.com 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(209.85.214.45):SA:0(-1.9/5.0):. Processed in 2.355239 secs); 01 Jul 2018 20:39:01 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_PASS,T_DKIMWL_WL_MED,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | 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== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=zVhZj+mXZs/D0VuF/RVVRs1B4Da0UnbULOBP70dGcAs=; b=gdKjz8WweDqZ2z9fX9aP4TS/H/04t4AG6/F9xFvoMuW8Ze3Ti5orzXaqTESTQ6NrhE S2J80t23DIVsz8sCkauezAAx9igjuqPywBIGizdUUlPIo4NaGRrsn/IvnqfjqNht9x7a RQ9caQUPd96kyI6A7trw62lnwVO3yOQ1XV8ov1UWIPrdekTOX4ZNG99Y00Yr56q2h53J Qd1mlDVgrHppb8GyYaXPsYQp7zHnvXsF6UvHk45uSm4J6eH80DmBmcQmFh8sMng6Iw9n 5r24ZMJnGpnpCbQHzYOeKDZRJp8VrLaXkkRFd8U6h0gGSSW5xvz4LdGXkKTyh45DuyQ9 4nsQ== X-Gm-Message-State: APt69E3auGNWp1rKdDIxHUs7GdgeSgNEgLFsq+aBlg0GsnGfYtDg35JN vncrtVpGQi0l/HA8oUQ+ee2zrgCm2EE= X-Google-Smtp-Source: AAOMgpcKOc2Ln8CjfZMTi44JHvzFM0uRw2s1LKdtmYqFqffddXYK+SrgayUm8/LPBydvF8yUS/Hfvg== X-Received: by 2002:a24:f8c1:: with SMTP id a184-v6mr7885702ith.146.1530477536279; Sun, 01 Jul 2018 13:38:56 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: Re: Huge delay for completions when not sorting From: dana In-Reply-To: Date: Sun, 1 Jul 2018 15:38:54 -0500 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: <651A4CB3-1D36-4668-9DC0-EFACDE13E26D@dana.is> References: To: martin@mvath.de X-Mailer: Apple Mail (2.3445.8.2) On 1 Jul 2018, at 12:56, Martin Vaeth 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