Just after Start-up Sluggishness
sarah.reichelt at gmail.com
Sun Jun 18 21:54:29 CDT 2006
On 6/19/06, Tom Cole <tom.cole at asu.edu> wrote:
> Here's one that I hope people will have ideas on. It's bugging me. I
> have a stack and when it opens, you click a button to play the game. On
> my XP machine at work, after clicking that button, the program waits
> something like five seconds before anything happens. Very unresponsive.
> Afterwards, everything screams along at full speed.
> I remember in HyperCard sluggishness like this could be cured by
> compacting the stack or by showing all cards.
> I'd love to get rid of this because when people first try the software,
> it hangs up a bit, and that isn't a very good way to introduce itself.
> Perhaps something in the preopenstack scritping?
It's got to be doing something during that time, so the problem is
finding out what. When you click the starting button does it open a
new stack? Does this stack have lots of graphics or a large image?
I've had things slow down while a large picture is displayed.
If you stop and start again without quitting so you get the same
slowness i.e. is it a once-off initialisation, or does it happen every
time, even if the game has already been played.
If you are openeing a new stack, try commenting out bits of the
openStack & preOpenStack handlers. The game probably won't run, but
you will be able to see if there is a particular line that causes the
problem. Similarly, if you close the startup stack, check it's
If the delay can't be found, or is found but can't be avoided, you'll
need to use some smoke & mirro tricks to make your users realise that
something is happening: a countdown as they wait to begin or something
like that. The important thing is to indicate that progress is being
made, don't just leave them wondering if the program has crashed or if
the button click didn't work.
More information about the use-livecode