caching of screen display...

John M McIntosh johnmci at smalltalkconsulting.com
Thu Dec 2 00:53:23 UTC 1999


>> A week back I asked about the poor performance of X-Windows updates.
>>
>> I was told lots of bits flow across the wire.
>>
>> So I looked
>>
>> On the mac in my test case of doing 100 Display restore I get 55,320 calls
>> to ioShowDisplay and of course to the Mac's CopyBits. Nice but expensive. My
>> mac does this in 52 seconds, so I'm getting at least 1000 screen updates a
>> second.
>>
>> I changed the code to cache updates which I then trigger each 1/60 of a
>> second if required. This reduces the CopyBits calls to 2417.
>>
>> Now Before I hack the X-Window's implementation I'm wondering if some other
>> squeaker has taken this path before?
>>
>From: lex at cc.gatech.edu (Lex Spoon)
....
> I think the best solution to remote display is to forget about X-Windows
> and write a solution in Squeak!  Write a Squeak display server, and
> write a Squeak display client that displays things by talking to a
> server.  That is, use the basic X-Windows model, but don't bother trying
> to force your stuff into the specific X-Windows protocol.  That
> way, you get a cross-platform remote display, and you get to
> do it well.
>
.....
> Lex
>
(Lex also had some thoughts on a more complicated solution)

But I took a simple way out and change the VM to cache screen updates. At my
site you can find a change set which you need to file in, then build your
own VM. All the changes required lurk in the VM. I've tested it on a Mac,
with Linux i686, and with Linux m68k and it seems to compile, and work ok.

http://www.smalltalkconsulting.com/papers/tipsAndThoughts/codeFragments.html

Could a few people could try it and let me know if there are any problems?

Enjoy. I'd be happy to get some performance (feel?) numbers out of people
using X across networks since my test case currently has a fast x-server,
but a slow x-client, and I can't judge the speedup correctly.

PS if you set a 16 millisecond delay then morphic animations flow just fine,
setting the delay to zero causes a fallback to the original VM behavior.
Setting the delay to 1000 causes some interesting human feedback issues, but
certainly reduces network traffic.

--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================
Custom Macintosh programming & various Smalltalk dialects
PGP Key: DSS/Diff/46FC3BE6
Fingerprint=B22F 7D67 92B7 5D52 72D7  E94A EE69 2D21 46FC 3BE6
===========================================================================





More information about the Squeak-dev mailing list