Probably so. There are three big hits when opening cards with large
images on them. The first is allocating colors: images frequently use
a large number of colors and *each* color allocation requires a server
round-trip call (because the X designers, in their non-infinite
wisdom, decided not to include a call for allocating multiple colors
in one call). MetaCard caches colors once they've been used, but this
only helps if the card you're going to uses mostly the same colors as
the one you're coming from.
The second big hit is decompressing the image. On systems with
shared memory server extensions, this is slightly more expensive since
the shared memory buffer needs to be set up.
Finally, there's moving the image down to the server.
> Is there any way to make it faster???
One of the best ways to improve performance in this area is to put the
images in a group and place the group on the card you'll be coming
from. Hiding the group is better than covering it up with another
object, since that way redraws will be fully suppressed (remember to
show the group in the preOpenCard handler of the card you want to show
them on). You still pay the price with this technique, but you get to
choose when you pay it.
Another possibility is to set the colormap, since that way MetaCard
can set all the colors in one call (XStoreColors) and when you open an
object, it just uses the closest color in that colormap rather than
asking the server for the colors it needs. Just keep in mind that if
you do this you run the risk of making the other applications on the
screen "go technicolor", and you must make sure that all of the colors
your images need are in the colormap you set. You can minimize the
"technicolor" problem by leaving the first 40-50 entries in the
colormap as they are (get the colormap first, and just change the last
200 lines in the string before setting it).
> Oh, I'm running on a 486-33.
You have my sympathy ;-) Actually, the processor speed isn't the
biggest problem with these things, it's the bottleneck (also known as
an "ISA bus") between the CPU and the video memory. Local bus systems
run MetaCard dramatically faster than the older types.
> David Humphreys
> MPR Teltech Ltd
> Burnaby, BC
-- *********************************************************************** * Scott Raney 303-447-3936 Remember: the better you look, * * raney@metacard.com the more you'll see -- Lidia * ***********************************************************************