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

Re: zsh slow and hogs cpu when using */*/*.ext on large file tree



On Dec 12,  5:43pm, Piotr Karbowski wrote:
}
} Actually it does not seems that 5.1.1 is much slower than 5.2. My report 
} was wrong as the grep did not showed up for 20s as with first X files it 
} wasn't finding anyting, here I've tested with ls.

To get an accurate reading of the time spent by the shell itself, you
should compare a command that generates the list of files and then
throws it away; e.g.

    time zsh -fc '/bin/true */*/*.ebuild'

There's really no way to get timings of the glob without also adding
the shell startup time, so this may be a little off (hence -f to try
to skip as much startup as possible).

To make the zsh time output look like bash's,

    TIMEFMT=$'real\t%E\nuser\t%U\nsys\t%S'

There are a whole lot of other possible values you can put in TIMEFMT in
zsh to get more details about where it might be taking extra.



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