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

Re: zsh-3.0-pre1: speed up the "list-choices" etc.



Zoltan Hidvegi <hzoli@xxxxxxxxxx> wrote:
>SUZUKI Hisao wrote:
>> etc. by improving the z-shell.  It is `nicezputs' in Src/utils.c
>> that displays the string of completion list, and its current
>> implementation calls `fputs' for each character in the string.
>> Modifying Src/utils.c so that `nicezputs' calls `fputs' once for
>> all characters, the speed becomes tolerable even on the slow
>> terminal.
>
>The speed difference should not be noticeable if the output goes to a
>buffered stream.  If the output is not buffered that's really a bug.

Indeed the speed difference is hardly noticeable on
Sparc-SunOS4.1, but it is noticeable on both i860-SysV4.0 and
Sparc-Solaris2.3 (Solaris2 is a version of SysV4 in fact, you
know).

Certainly it is utterly intolerable only with slow I/O (and slow
CPU), the difference is _noticeable_ even if you use a
high-speed terminal (such as xterm on X11) and a not-so-slow CPU
(such as SPARCstation5 running Solaris2.3).  For example, you
can see the listing displayed character-by-character on xterm
running Sparc-Solaris2.3 z-shell:

	% cd zsh-3.0-pre1/Src
	% <^L>				[clear-screen]
	% ls <SPC><^D>			[delete-char-or-list]
	zsh: do you wish to see all 114 possibilities? y
	[...listing displayed character-by-character...]

Undoubtedly the output is not buffered on these machines, and I
doubt if it is a bug in itself.

# BTW, `Suzuki' is my family name and `Hisao' is my given name.
# In Japan, the family name comes first and the given name last,
# as in Hungary.  As you call yourself `Zoltan Hidvegi' in
# English context, I'd better have called myself `Hisao Suzuki'
# as long before...

Regards,

SUZUKI Hisao		# `Begin at the beginning and go on till
suzuki@xxxxxxxxxxxxxx	# you come to the end:  then stop.'




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