From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id SAA18533 for ; Mon, 8 Jul 1996 18:24:40 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA03464; Mon, 8 Jul 1996 04:16:00 -0400 (EDT) Resent-Date: Mon, 8 Jul 1996 04:16:00 -0400 (EDT) From: Zefram Message-Id: <28128.199607080730@stone.dcs.warwick.ac.uk> Subject: Re: zsh-3.0-pre1: speed up the "list-choices" etc. To: suzuki@otsl.oki.co.jp (SUZUKI Hisao) Date: Mon, 8 Jul 1996 08:30:54 +0100 (BST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <9607080038.AA01466@oz.fantasy.otsl.oki.co.jp> from "SUZUKI Hisao" at Jul 8, 96 09:38:47 am X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]7776.56 X-US-Congress: Moronic fuckers MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"w063Q2.0.2s._ECun"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1565 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > Certainly it is mainly because of the terminal and its >device interface, it is possible to speed up the "list-choices" >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. The reason it does that (and I can answer with authority here as I originated that code) is that fputs(), being part of stdio, should buffer output. It is consequently not really significant how many times it actually gets called. Had we been dealing with unbuffered output, I would have added some explicit buffering. >Modifying Src/utils.c so that `nicezputs' calls `fputs' once for >all characters, the speed becomes tolerable even on the slow >terminal. If that's the case, then it indicates something more fundamental is wrong. I suspect that it's a problem with your system. In my experience, zsh's completion lists appear at pretty much the speed the terminal is set to (9600 baud for me at the moment, and that's normal). zsh doesn't disable buffering on the tty output stream at any point -- it uses fflush() appropriately. -zefram