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 Sat, Mar 17, 2018 at 11:12:44AM +0100, Oliver Kiddle wrote:
> I didn't really follow the original discussion. But if getline() solves
> an issue and the #ifdef mess to handle old systems isn't too bad (at
> least compared to the rest of the shell) then I'd say cook up a patch.
> For compatibility, getline() is the sort of thing where we can just
> include a replacement implementation so the mess can be separate from
> the actual code. I've included a suitable implementation below.

After spending a bit of time writing up a patch and testing it, getline()
unfortunately didn't seem to solve the original performance problem in
any sort of ground-breaking way, and so after thinking it over a bit
more, I don't really think this would end up being would be any sort
of worthwhile solution.

For such a tiny performance benefit, it seem like we would be better
served looking for a solution somewhere else.

The getline() replacement implementation was very appreciated, anyway; even
though this ended up going nowhere, it saved me a day or two in getting
here :)

Joey Pabalinas

Attachment: signature.asc
Description: PGP signature

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