Xref: utzoo comp.unix.wizards:10883 comp.sys.att:4166 Path: utzoo!utgpu!water!watmath!clyde!att!chinet!les From: les@chinet.UUCP (Leslie Mikesell) Newsgroups: comp.unix.wizards,comp.sys.att Subject: Re: Fastest way to output to terminal Message-ID: <6486@chinet.UUCP> Date: 3 Sep 88 20:10:10 GMT References: <136@iquery.UUCP> Reply-To: les@chinet.UUCP (Leslie Mikesell) Organization: Chinet - Public Access Unix Lines: 21 In article <136@iquery.UUCP> matt@iquery.UUCP (Matt Reedy) writes: >We have a very terminal-I/O intensive application and are attempting to >optimize the output to the terminal. (We looked at curses but decided against >it because we needed more flexibility.) What is the fastest way to get >output to the terminal? We have tried two methods: .... >Neither of these seems to be as fast as curses. Someone told me curses is >faster because it doesn't send very many 'locate cursor' ( tgoto (CM..) ) >commands. Is this true? Any other ideas? Curses is fast because it doesn't actually output everything you send. It keeps track of what is already on the screen and skips anything that is already there. It also performs calculations to optimize the output depending on the functions available on the particular terminal. You can get an idea of what is happening if your terminal has a "monitor" mode where it displays control sequences instead of obeying them. Depending on what you intend to display, it may be easy or difficult to do this in your own code (probably difficult). Les Mikesell