Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Slowness issue with git completion
- X-seq: zsh-workers 29077
- From: Nikolai Weibull <now@xxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Slowness issue with git completion
- Date: Wed, 27 Apr 2011 08:13:31 +0200
- Cc: zsh-workers@xxxxxxx
- 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=
- In-reply-to: <110426211951.ZM4200@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <BANLkTinKo=W8umz=JfneD3MNYdmv=xYhFQ@mail.gmail.com> <87liyw7t0o.fsf@ft.bewatermyfriend.org> <BANLkTim6WJWCrfLokA045Sc8su8DMXnKNw@mail.gmail.com> <BANLkTi=eLWad_TB4L=chD=3Fb_Pd9AQyqQ@mail.gmail.com> <BANLkTi=PrLsikjVhA-e06gjEkkxDpsdVaw@mail.gmail.com> <BANLkTi=N0DjXbf70LCo422DQ_2b0_dK_AQ@mail.gmail.com> <BANLkTikwk=OUQ7TzQB6FNcD2wztj+LHOGw@mail.gmail.com> <BANLkTinadx+av3XhHrdem8aNqp=k7Gm69Q@mail.gmail.com> <BANLkTikLMKZmCAxt=Ac-t-R_ZccZMt3pqg@mail.gmail.com> <110426211951.ZM4200@torch.brasslantern.com>
- Sender: nikolai.weibull@xxxxxxxxx
On Wed, Apr 27, 2011 at 06:19, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> Also as someone noted elsewhere, zsh isn't very efficient at doing
> array appends or slices. Both complex string manipulations and lots
> of array slicing/appending are done in __git_files_relative which is
> called from _git_files. Not only that, but it does string ops on the
> 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. Heck, 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’ll try to find time to look into this.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author