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

Re: replacement slowdown



On Apr 22, 11:19pm, Clint Adams wrote:
}
} Well, I haven't profiled 4.2.1, but in 4.2.5, it's spending all its time
} in ztrsub (called 57093 times) in pattryrefs.

Is that a profile for the entire shell from startup to exit, or just
for the ${(f)"$(</tmp/blah)"//,/x} substitution?

Is zsh compiled with debugging (that is, with the DEBUG macro defined)?
ztrsub() shouldn't be particularly expensive, but it's a bit more so in
debugging mode.

Also, there's no loop in pattryrefs(), so the fact that it's in ztrsub()
may be misleading.  There are exactly 2 calls to ztrsub() in there.
What's calling pattryrefs() 28000+ times?  Is that how many lines there
are in /tmp/blah?



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