From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18131 invoked by alias); 27 Apr 2011 06:13:40 -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: X-Seq: 29077 Received: (qmail 20479 invoked from network); 27 Apr 2011 06:13:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2E+qnl3KABdusQ1VgPBUQzlKi1wCTDms2b3tYAGhkLM=; b=LZp7tFTR5D6ttvFfcRS1eQmvOQ/CW1cgV317H5GejlkR1/OGLSarGAUOyhRwS782s1 eXh3DcnKQ6Rn1P3yZk0fYhm9AlS+vxIO05Sz41EraQn5G06jKZvqtMSZFDgaYGSG9SCM k72k3O/uvHFzxSz0Z3VJ94UWemo6CO6zlKTWQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=svRiX5yC8HU0GBjqgDLTAqk0+nwLdZM4TQl0z0uGsX0DnD1Iuy6HO557rcereGQ67e M+yUbTXjholm0irkeMPLSjccE/OjPikJp11mA7owl5XbJYGO/omwLhu71hjLHbayxzOL wxTemIUKCX8BdBzQADSI2WZvNxXRnEE/nWpWA= MIME-Version: 1.0 Sender: nikolai.weibull@gmail.com In-Reply-To: <110426211951.ZM4200@torch.brasslantern.com> References: <87liyw7t0o.fsf@ft.bewatermyfriend.org> <110426211951.ZM4200@torch.brasslantern.com> Date: Wed, 27 Apr 2011 08:13:31 +0200 X-Google-Sender-Auth: wjjVRwAtY97DGDbIIEcFHY7rm_o Message-ID: Subject: Re: Slowness issue with git completion From: Nikolai Weibull To: Bart Schaefer Cc: zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, Apr 27, 2011 at 06:19, Bart Schaefer wr= ote: > Also as someone noted elsewhere, zsh isn't very efficient at doing > array appends or slices. =C2=A0Both complex string manipulations and lots > of array slicing/appending are done in __git_files_relative which is > called from _git_files. =C2=A0Not only that, but it does string ops on th= e > path prefix on every pass around the "for file in $rawfiles" loop; > that at least could be abstracted. > > I suspect that if someone undertook to rewrite __git_files_relative > wholly or partly in something like sed or awk, the whole thing would > be down to ~2 seconds even for a large number of files. =C2=A0Heck, even > redoing the nested loops to do one multi-element array slice each > instead of many single-element splices might make a huge difference. I=E2=80=99ll try to find time to look into this.