bug-hurd
[Top][All Lists]
Advanced

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

scrolling optimization + asynchronous updates impossible


From: Marcus Brinkmann
Subject: scrolling optimization + asynchronous updates impossible
Date: Fri, 14 Jun 2002 23:44:22 +0200
User-agent: Mutt/1.3.28i

Hi,

it just occured to me that asynchronous updates and scrolling optimization
don't work.  I deluded myself before when convincing myself that it would
work.

The problem is the following sequence:

Writing "abcdefg", moving cursor back to "a".  => FILE_CHANGE_WRITE
Delete three characters, leading to "defg   ". => FILE_CHANGE_TRUNCATE, 
FILE_CHANGE_EXTEND

Now the client side.  Imagine it starts to process the updates _after_ the
above has happened.

FILE_CHANGE_WRITE => Read from memory "defg   ", and update screen.
FILE_CHANGE_TRUNCATE, FILE_CHANGE_EXTEND => Detect deletion of three
characters, leading to "g      ".  Oops.

The problem is that just before any scrolling, you need a synchronization
between server and client.  This is not so good.  I guess I will just change
this to normal WRITE notifications.  The scrolling of the whole screen (when
writing past the end of it) is done by incrementing CUR_LINE anyway, and so
the above mentioned scrolling (deletion/insertion of characters and lines)
doesn't happen too often anyway.  Mmmh.  Maybe it is used a lot in text
editors like emacs (OTOH, the ncurses man pages seems to discourage it
because it causes flicker).  I will check that out.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

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