Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Source mangling in $functions_source and typeset -f
- X-seq: zsh-users 27374
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Ray Andrews <rayandrews@xxxxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Source mangling in $functions_source and typeset -f
- Date: Sat, 27 Nov 2021 12:14:33 -0800
- Archived-at: <https://zsh.org/users/27374>
- In-reply-to: <66a84643-de4f-ef74-4664-d2400f74f2e6@eastlink.ca>
- List-id: <zsh-users.zsh.org>
- References: <CAMP9c5n-hGj5ifk9KDZM29=e1u8m6nLDhxtsNgsqHKr7mLALcQ@mail.gmail.com> <CAH+w=7bkxmP9rVeiMObYBXpeayY2Hf8qDRp6r_570wkE3ZdQHA@mail.gmail.com> <66a84643-de4f-ef74-4664-d2400f74f2e6@eastlink.ca>
On Sat, Nov 27, 2021 at 11:26 AM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> On 2021-11-27 9:47 a.m., Bart Schaefer wrote:
> >
> > With the exception of the contents of strings (including
> > here-documents), the original source of a function is not kept in
> > shell memory.
> That's most interesting, it seems circular so there must be a good
> reason for it
The parse is stored in a bytecode format (the same one used when
writing a file with zcompile) so:
It's much smaller than the source (usually), and takes up less memory.
It's much closer to being directly executable than the source, and
therefore faster.
Zach's use case is unusual; there's typically not any reason to "preserve more".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author