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

Re: Extended globbing seems to have become much slower in recent versions of Zsh



On Mar 5,  9:37am, Bart Schaefer wrote:
}
} E.g. you should find that
} 
} x=(**/*)
} y=(${x:#(|*/)(build|target|node|node_modules|.idea|*.min.js|*.iml|TAGS)(|/*))
} 
} takes about the same amount of time as your **/*~pat formulation

Curiously, the ${x:#...} construct is considerably faster than **/*~(...)
for me, even on 5.0.5.

I suspected briefly that signal handling changes (so that long-runing
recursive globs are interruptible) might be having an effect, but the
same code path through the signal queuing should be taken with both the
glob exclusion and the parameter substitution.

As I've mentioned, on my Linux desktop the majority of time is spent
in resolving the (-.D) qualifier, but that's partly because the (-)
is pulling in a new set of subdirectories so more files are found.

I'm beginning to think we need some kind of C-code-level profiling tool
like gprof to tell us where the time is being spent.



Messages sorted by: Reverse Date, Date, Thread, Author