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

Re: Lazy functions like in Vim autoloading, however slower, maybe inspire someone



On 5 czerwca 2017 at 07:18:09, Sebastian Gniazdowski (psprint@xxxxxxxxxxx) wrote:
> However I get 104 ms:
> 1) 19 104,15 5,48 73,86% 52,76 2,78 37,41% (anon)
>  
> for traditional sourcing, and 125 ms:
> 1) 19 125,44 6,60 76,69% 71,50 3,76 43,72% (anon)
>  
> for ziniload-sourcing.

It turned out that loading function bodies from `functions.zini` is indeed super fast: 1.39 ms. However, plugin.zsh often calls its defined functions. So the delayed parsing is then triggered, at Zsh startup, and is slower than normal parsing.

So no way out, unless the side-track for functions can be something different, yet being a side-track.
-- 
Sebastian Gniazdowski
psprint /at/ zdharma.org



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