caching of screen display...

John M McIntosh johnmci at smalltalkconsulting.com
Mon Nov 29 18:27:24 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?

PS Lastly I'm actually not caching the incoming bits since I assume we are
drawing from special object TheDisplay, and I can just cache the region to
display versus all the bits. I couldn't see a case where the incoming bitmap
was different, but I am willing to be correct this assumption this early in
the morning.

PPS stXPutImage looks like an interesting place to update with some caching
code eh?


--
===========================================================================
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