Best Squeak setup for servers

Lex Spoon lex at cc.gatech.edu
Fri Nov 14 22:17:46 UTC 2003


John M McIntosh <johnmci at smalltalkconsulting.com> wrote:
> One problem with how Squeak does things is that redrawing of a complex  
> object is lots of bitblting to the screen. That results in
> lots of screen updates that need to flow over the long wire with TCP/IP  
> delay overhead which results in poor performance.

I'm confused.  For local displaying, Morphic does operations on its
local Display bitmap, and then the damaged areas get forced to the
screen all at once.  I recall that it is important to support the
semantics for the display to look correct; sometimes Squeak will
intentionally do a display update followed by drawing essentially junk
on the screen.  If you don't support the deferred screen updates, then
you get the junk. (The specific case was dragging a morph using the
hand; the drawing cycle involves drawing the dragged morph, updating the
screen, and then undrawing the dragged morph.).  See
#displayWorld:submorphs:  for details; note the forceToScreen: that
happens near the end of the method.

That's local display; so how about over the network?  A generic VNC
server wouldn't see anything out of Squeak until Squeak did its bulk
end-of-cycle forceToScreen: command.  So it would see only the minimum
portions of the screen that need to be forwarded.  On the other hand, if
you are using Nebraska to talk over the network, then all of the
individual commands are seen but that's usually a bonus; the drawing
commands are more numerous, but they are also much more compact to
transmit.

Are you suggesting that the display be updated *less* often when
bandwidth is challenged,  e.g., wait for 100 milliseconds before sending
any screen updates even if multiple morphic cycles happen in the
interim?  You can probably approximate this effect by changing the
"MinCycleLapse" variable in PasteUpMorph.  That will slow down all of
Morphic, but I would guess that cycles you can't see give you about the
same user experience as simply cycles that are less frequent.

Incidentally, if you really want high performance and are willing to
spend some programming time to make it happen, then you are almost
certainly better off by starting with Nebraska.  Nebraska knows about
Squeak and Squeak knows about Nebraska, so you can do more optimizations
than you can with VNC.  One thing that would be nice to do, would in
fact be to have Morphic slow down and/or skip display updates when it
notices one of its remote displays is backlogging.


-Lex



More information about the Squeak-dev mailing list