[plt-scheme] excessive refresh

From: Dave Herman (dherman at ccs.neu.edu)
Date: Thu Oct 30 14:30:14 EDT 2008

It's beautiful now. Thanks so much.

Dave

Matthew Flatt wrote:
> At Tue, 28 Oct 2008 12:20:16 -0400, Dave Herman wrote:
>> In DrScheme, navigating through my code causes the entire editor screen 
>> to refresh in order to redraw the paren highlighting, rather than 
>> refreshing just the affected regions. When I *insert* parens, it 
>> actually flashes multiple times.
> 
> The latest in SVN should be better.
> 
> At Tue, 28 Oct 2008 16:26:44 -0500, "Robby Findler" wrote:
>> FWIW, Matthew and I know about the issue but just haven't found time
>> to fix it. The problem is specific to multi-line paren highlighting
>> (or other multi-line highlighting, but parenthesis highlighting is the
>> easiest to make it happen). The problem is that the interface
>> presented to the Scheme code for redrawing editors is fairly coarse
>> grained when you want to draw outside inside the editor canvas's
>> graphical region, but to the right of the widest line in the editor
>> (the only thing you can do to reliably draw there is redraw the entire
>> window).
> 
> Internally, `editor-canvas%' now uses the 'no-autoclear style of
> `canvas%' to avoid erasing of the window. So, it still redraws the
> whole canvas, but you shouldn't see it because the redrawn image is
> copied directly over the old one.
> 
> 
>> On macs it is less visible because the drawing appears to be
>> significantly more efficient, or maybe just the windows machines are
>> slower, I don't konw. 
> 
> It's because Mac OS buffers window content, and by default it updates
> each window's screen image only on GUI-event boundaries. So you don't
> usually see the intermediate white state. (Also, under Mac OS,
> `editor<%>' drawing relies on the OS-implemented buffer instead of
> using its own buffer.)
> 
> Mac OS updating even seems to clean up refresh for Windows programs
> running under Parallels, which is partly why I didn't understand how
> bad the problem was.
> 
> 
> Matthew
> 



Posted on the users mailing list.