zsh-workers
 help / color / mirror / code / Atom feed
* Weird delay on long command lines
@ 2005-12-09 20:36 Mikael Magnusson
  2005-12-12 16:42 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Mikael Magnusson @ 2005-12-09 20:36 UTC (permalink / raw)
  To: zsh-workers

This mostly happens when i paste gcc commands from autoconf, but it's
easy to reproduce with the alt-number keybinds. For example type
alt-1000 and press a, then press left arrow. You'll notice it takes a
second or two before anything happens. I've confirmed the same thing
happens with zsh -f. Attaching with strace shows the final argument to
poll() seems to be O(n) with the command line length but I really have
no idea why (or what the poll is for, haven't looked at the code).

--
Mikael Magnusson


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Weird delay on long command lines
  2005-12-09 20:36 Weird delay on long command lines Mikael Magnusson
@ 2005-12-12 16:42 ` Peter Stephenson
  2005-12-12 19:30   ` Mikael Magnusson
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 2005-12-12 16:42 UTC (permalink / raw)
  To: zsh-workers

Mikael Magnusson <mikachu@gmail.com> wrote:
> This mostly happens when i paste gcc commands from autoconf, but it's
> easy to reproduce with the alt-number keybinds. For example type
> alt-1000 and press a, then press left arrow. You'll notice it takes a
> second or two before anything happens. I've confirmed the same thing
> happens with zsh -f. Attaching with strace shows the final argument to
> poll() seems to be O(n) with the command line length but I really have
> no idea why (or what the poll is for, haven't looked at the code).

It's to do with the optimisation of the display for low baud rates.  BAUD is
initiliased from the terminal driver which may well have it set to
something low like 38400.  Try setting it to something much larger, or
unsetting BAUD altogether.

It's probably more trouble than it's worth nowadays; the number of serial
line terminals, or even remote terminals where it's worth optimising the
terminal handling, is probably quite limited.  Maybe it shouldn't be set by
default.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Weird delay on long command lines
  2005-12-12 16:42 ` Peter Stephenson
@ 2005-12-12 19:30   ` Mikael Magnusson
  0 siblings, 0 replies; 3+ messages in thread
From: Mikael Magnusson @ 2005-12-12 19:30 UTC (permalink / raw)
  To: zsh-workers

On 12/12/05, Peter Stephenson <pws@csr.com> wrote:
> Mikael Magnusson <mikachu@gmail.com> wrote:
> > This mostly happens when i paste gcc commands from autoconf, but it's
> > easy to reproduce with the alt-number keybinds. For example type
> > alt-1000 and press a, then press left arrow. You'll notice it takes a
> > second or two before anything happens. I've confirmed the same thing
> > happens with zsh -f. Attaching with strace shows the final argument to
> > poll() seems to be O(n) with the command line length but I really have
> > no idea why (or what the poll is for, haven't looked at the code).
>
> It's to do with the optimisation of the display for low baud rates.  BAUD is
> initiliased from the terminal driver which may well have it set to
> something low like 38400.  Try setting it to something much larger, or
> unsetting BAUD altogether.
>
> It's probably more trouble than it's worth nowadays; the number of serial
> line terminals, or even remote terminals where it's worth optimising the
> terminal handling, is probably quite limited.  Maybe it shouldn't be set by
> default.

Yeah, unsetting BAUD fixed it, thanks.

--
Mikael Magnusson


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-12 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-09 20:36 Weird delay on long command lines Mikael Magnusson
2005-12-12 16:42 ` Peter Stephenson
2005-12-12 19:30   ` Mikael Magnusson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).