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

Re: Why sourcing a file is not faster than doing a loop with eval, zle -N



On 20 czerwca 2017 at 01:01:26, Bart Schaefer (schaefer@xxxxxxxxxxxxxxxx) wrote:
> On Jun 19, 9:52pm, Peter Stephenson wrote:
> }
> } I know what the problem with it is --- we can't tell the difference
> } betwen a terminating '\0' and a '\0' that's part of the input stream.
> 
> I'll add a comment to that effect and commit my patch from w/41322.

I have just noted a huge speed up of Zsh startup and ran bisect. I do:

repeat 10 { time /usr/local/bin/zsh -i -c exit }

and before 41322, speed is 400 ms, 350 ms when everything is compiled. With this patch, it is 220/200 ms. I thought this effect will be only for sourcing not-compiled files.

Basically this means that all the frameworks like Oh-My-Zsh can grow in size a "little" more ;)

With my hasher optimization that's 205/185 ms, but 41322 is just paradigm-shift.

-- 
Sebastian Gniazdowski
psprint /at/ zdharma.org



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