Multicard Stack, Standalone Speed, and screenNoPixmaps property

Levi Kendall ljk144 at gmail.com
Tue Apr 11 13:16:06 EDT 2006


Hi All,

I have a somewhat complicated speed issue I've been trying to resolve in a
standalone application (this problem is not observed in IDE / stack mode).
I have a multi-card stack which begins with what could be considered a
"launch window" that gives the user the option to go to various other parts
of the application.  When the user clicks on the desired icon, the stack
goes to a different card depending on what they clicked.  Now my issue is
the FIRST time the user ever goes to another card, there is a significant
delay (up to 7+ seconds on slower P3 machines).  Also the memory useage goes
from about 11MB to 22MB the first time another section in the app is
accessed.

Now here is the odd part, after the user has gone to another card,
everything runs blazingly fast after that, even if they return to the
"launch window" and load another different section of the application.  It's
only the first time a card switch occurs that this significant slowdown can
be observed.

With some poking around I've determined the source of the slowdown, which
seems to be the screenNoPixmaps property.  What I assume is going on here is
the first time another card is accessed, the application creates a new
buffer for the card and writes all the graphics to that before displaying.
This agrees with the memory use getting a significant boost as well.  After
the buffer has been created everything runs at full speed.  So apparently
*creating* the buffer is where the performance hit is.

Turning off screenNoPixmaps is also undesireable because this will cause
refresh flicker occassionaly while using the application, rather than always
having nice smooth transitions there will be some "scanlines" visible during
some refreshes.  It does however run at "full" speed all the time, even when
the first section is accessed.  The memory useage also stays at something
around 11MB, which further proves my theory on this.

What I would like to do (if at all possible) is force the secondary buffer
to be created immediately upon program launch, ideally during the splash
screen phase before the user can see any actual parts of the GUI.  Is there
any way to force the creation of this buffer ahead of time?  And if not is
there any way to maintain a constant speed without having the drawback of
"scanlines"?

-Levi Kendall



More information about the use-livecode mailing list