Re: [PATCH 1/2] completion: improve ls-files filter performance

2018-03-19 Thread Johannes Schindelin
Hi drizzd, first of all: thank you so much for working on this. I am sure it will be noticeable to many Windows users, and also make my life easier. On Sat, 17 Mar 2018, Clemens Buchacher wrote: > From the output of ls-files, we remove all but the leftmost path > component and then we eliminate

Re: [PATCH 1/2] completion: improve ls-files filter performance

2018-03-17 Thread Junio C Hamano
Clemens Buchacher writes: > From the output of ls-files, we remove all but the leftmost path > component and then we eliminate duplicates. We do this in a while loop, > which is a performance bottleneck when the number of iterations is large > (e.g. for 6 files in linux.git).

[PATCH 1/2] completion: improve ls-files filter performance

2018-03-17 Thread Clemens Buchacher
>From the output of ls-files, we remove all but the leftmost path component and then we eliminate duplicates. We do this in a while loop, which is a performance bottleneck when the number of iterations is large (e.g. for 6 files in linux.git). $ COMP_WORDS=(git status -- ar) COMP_CWORD=3;