bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cost of operations.


From: Daniel Weaver
Subject: Cost of operations.
Date: Wed, 22 Jan 2003 15:10:01 -0800

At 08:42 PM 1/22/2003 +0100, Philippe Blain wrote:
>
>----- Original Message -----
>From: "Daniel Weaver" <address@hidden>
>To: "Philippe Blain" <address@hidden>
>Cc: "bug-ncurses" <address@hidden>
>Sent: Thursday, January 16, 2003 2:48 AM
>Subject: Re: Corrections for 20030111
>
>
>>
>> The code is correct.  It should NOT take into consideration XON/XOFF,
>> pad baud rade and no pad character.
>>
>> Lets take for example XON/XOFF.  If I define two terminfo definitions
>> with everything the same but the XON/XOFF boolean, ncurses should
>> send the same strings.  The cursor movement would have the exact same
>> cost regardless of the settings for XON/XOFF.
>> -----------------------------
>> Dan Weaver, ZNYX Networks
>>
>----------------------------------------------------------------------------
>If two terminfo definitions have everything the same but the XON/XOFF
>boolean,
>any delay that is in a terminfo capability is not executed (by waiting or
>sending nulls) when XON is true.
>By doing so, their COSTS in 1/10th of milliseconds are different.

For any given terminal the amount of time needed to execute an operation
will be the same regardless of baud rate or XON/XOFF settings.  The
purpose of adding pads to a capability is to tell ncurses how long it
takes a given operation to execute.

For example, the clear screen function is typically the slowest
operation the terminal does.  The terminal will take the same
amount of time to clear the screen at 300 baud as it does at 19,200
baud.  Even when XON/XOFF is set for the terminal the clear screen
function will take the same amount of time.

So, here is the challenge ncurses has to face.  Lets say the screen is
clear except for 20 characters.  Is it faster to clear the entire
screen or send 20 characters of blanks?  That question can only be
answered by looking at the pads for the clean screen function.
Padding-baud-rate, no-pad-character and XON/XOFF provide no useful
information for making the decision on which string to send.




-----------------------------
Dan Weaver, ZNYX Networks
address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]