[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Random Text and Attributes Scroll Quickly; Periodic, Slowly
From: |
Thomas Dickey |
Subject: |
Re: Random Text and Attributes Scroll Quickly; Periodic, Slowly |
Date: |
Mon, 7 Sep 2015 20:06:27 -0400 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
On Sat, Sep 05, 2015 at 08:15:17PM -0400, Grady Martin wrote:
> On 2015年09月05日 19時09分, SunnyCemetery wrote:
> >I have uploaded the putwin() output for these pads and would be grateful if
> >somebody could test and confirm. I would be even more grateful for some
> >kind of explanation, as I am unable to make sense of a pad with more data
> >and higher entropy scrolling faster than its simpler counterpart.
> >
> >https://www.dropbox.com/sh/gmdpvz8gio135ob/AADTmhDwmL1D7JFtCvlrTW9ga?dl=0
>
> And here is a file for testing. Pass a pad and scroll with j/k.
>
> https://github.com/NoSuck/CursesPadScroller/blob/master/TestC.c
This is probably the issue (scrolling performance is really a long story):
a) when updating the screen, ncurses knows how to scroll the
whole screen, and will discount some along the margins,
if "most" of the lines are changed over "most" of their
width.
b) if it does not seem cost-effective to mix scrolling with
partial line-updates, ncurses simply updates the whole
screen.
c) when updating a line, ncurses will notice chunks where the
old/new line are the same. If there are a lot of those,
the update can be faster - if it's cheaper to skip over them.
The figure of the random example has more gaps (in the data), and probably
offers more opportunity for ncurses to skip over things as in (c).
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature