Fastest way to output to terminal

Leslie Mikesell les at chinet.UUCP
Sun Sep 4 06:10:10 AEST 1988


In article <136 at iquery.UUCP> matt at 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



More information about the Comp.unix.wizards mailing list