Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: query terminal properties on ZLE startup
- X-seq: zsh-workers 53384
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: PATCH: query terminal properties on ZLE startup
- Date: Wed, 26 Feb 2025 00:46:09 +0100
- Archived-at: <https://zsh.org/workers/53384>
- In-reply-to: <CAH+w=7ZJNRy2zV7t4wRhzcnW1jn2LgRKbMByCOrtbr9VVM2emw@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <42572-1740099942.836692@_3BM.v5Iz.JqiS> <F07C8421-2663-440A-82AD-0748D39511B1@kba.biglobe.ne.jp> <CAH+w=7a9hye-2BxQUjkHw-=zFo5T7vXjVwQRnKnKEoZ3W0-_ug@mail.gmail.com> <40483-1740433325.086036@2QZo.3hhS.-9FG> <CAH+w=7Zf3vL6BYg0t61uskLmDD_gOwE7XhuwxB9SSwv+z0qOKw@mail.gmail.com> <69272-1740474756.308875@TCCj.PrGv.2vsI> <CAH+w=7ZJNRy2zV7t4wRhzcnW1jn2LgRKbMByCOrtbr9VVM2emw@mail.gmail.com>
Bart Schaefer wrote:
> I'd like to see Roman's startup time stats run again with this in
> place. If querying the terminal significantly delays the printing of
> the first prompt, I'd think this should at least be something that can
> be setopt'd off and explicitly invoked later.
I'm not sure what Roman's startup time stats did precisely but it is
tiny in comparison to the sorts of times you get for starting completion
or any of the more substantial plugins.
Doing `time zmodload zsh/zle` registers a time of 0.000 most of the time
both with and without the patch.
The experiments I did to refine the timeout to use on the reads would
fairly accurately reflect the time for just the terminal queries and
I was intentionally doing those on a 9600 serial link. In a local
xterm/whatever it completes within the 1/100th second that you
get by setting the TIMEOUT constant to -1. Over the serial line 0.2s was
about the minimum to be guaranteed of completion. The timeout provides a
worst case. We could reduce that and perhaps make sure that the key
input code will swallow late arriving terminal responses.
In the current form, there's no setopt but you can disable it all with:
.term.extensions=( -query ).
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author