Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Slowness issue with git completion



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