bug-ncurses
[Top][All Lists]
Advanced

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

Re: What, exactly, _is_ "line-breakout optimization"?


From: Bill Gray
Subject: Re: What, exactly, _is_ "line-breakout optimization"?
Date: Sun, 19 May 2024 16:46:39 -0400
User-agent: Mozilla Thunderbird

Hi Thomas,  all,

   (much snipped)

At 2024-05-19T08:59:47-0500, G. Branden Robinson wrote:
"If fildes is a valid file descriptor, typeahead is enabled during
refresh; Curses periodically checks fildes for input and aborts the
refresh if any character is available."

Just out of curiosity : I gather that the idea is that this helps on devices where a full refresh might take appreciable time, and a key hit might come in while that refresh was taking place that would force yet another update and refresh. (Say, scrolling through a file in a text editor, with the cursor key held down; if the time to redraw the screen was close to the key repeat rate, you'd do better to stop the moment you knew a key had been hit.)

You'd presumably want to check for a key hit after refreshing N characters or N lines, with N smaller for slower refreshes and/or cheaper key hit detection.

I see PDCurses had this capability, but it was removed because "the line-breakout optimization system... simply didn't work, and never has"[1]. At this point, screen refreshes are fast enough that I don't see how the capability could be useful.

-- Bill

[1] https://github.com/Bill-Gray/PDCursesMod/blob/master/docs/HISTORY.md


If I had to guess, I'd say the language of which I complain came from
the same source as the breezy flogging of "a modified Heckel algorithm
on line hashes to fill in scramble-vector information" in a May 1996
change.

yes - some of that's amusing (actually I looked up the Heckel paper a long
time ago, and didn't see the resemblance versus the algorithm - chalked it
up to hyperbole).
Thomas Dickey noted[1] that "when [he] measured it, rather than
improving performance, the result was often slower, typically 5-20%".

Presumably the objective of the feature was not to improve the
performance of ncurses, but to astound the credulous reader with
impressive-sounding buzzwords.

Regards,
Branden

[1] https://invisible-island.net/ncurses/ncurses-license.html






reply via email to

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