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

Re: A serious bug in execution – where to debug?



On Tue, Jul 30, 2019 at 11:54 PM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> On Tue, 30 Jul 2019 at 23:45, Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > On Tue, Jul 30, 2019 at 11:38 PM Sebastian Gniazdowski
> > <sgniazdowski@xxxxxxxxx> wrote:
> I avoided localoptions for performance – it consumes some time, as it
> (probably, but the performance effect is confirmed) allocates a new
> table of options and fills it with defaults. So I've decided to write
> an option-transparent code. But turns out that this might be hard in
> case of such options as errreturn. I'll think about whether to replace
> inline conditions with if-then or to do emulate -L.

Keep in mind that 5.4 (I think it was 5.4) had a bug where a false
condition under `if` was causing the function to return if err_return
is set. Same with `while` -- it would return from the function at the
end of iteration. 5.4 is still very popular.

My solution for the performance problem is to call `emulate -L zsh`
only at the points of entry (public API) and then avoid calling too
many small functions.

Roman.



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