[net.sources] Maryland Windows bug

chris@umcp-cs.UUCP (11/20/83)

There's a bug in the update optimization code in my windows package.
In disp.c, LastRedisplayPaused is tested, but never cleared; this can
lead to much CPU wastage and an amazing amount of performance degradation
when there are lots of windows on the screen.

There's a little section of code in Wrefresh () that looks like this:

    if (ScreenGarbaged || LastRedisplayPaused) {
	for (i = 1; i <= ScreenLength; i++)
	    WDclearline (i);
	for (w = WinList; w; w = w -> w_next) {
	    if ((w -> w_status & WHIDDEN) == 0)
		WDoDump (w);
	}
    }

It should look like this (one line added):

    if (ScreenGarbaged || LastRedisplayPaused) {
	LastRedisplayPaused = 0;
	for (i = 1; i <= ScreenLength; i++)
	    WDclearline (i);
	for (w = WinList; w; w = w -> w_next) {
	    if ((w -> w_status & WHIDDEN) == 0)
		WDoDump (w);
	}
    }

I simply forgot to clear LastRedisplayPaused.

I'm afraid that by now my version numbers are hopelessly out of date
with those out on Usenet, so I can't tell you which version this is.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris.umcp-cs@CSNet-Relay