[comp.sys.mac.hypercard] SuperCard/HyperCard Performance Questions

mrosenberg@dwovax.dec.com (12/29/89)

I've been playing with SuperCard for a while now and the performance relative
to HyperCard is really poor.  Switching between cards can take up to 5 seconds!

I called Silicon Beach and they suggested doing a "get the heapSpace" every so
often to help SuperCard "clear its head".  This helped a little.

I have a different performance question though...

I have a user written handler that runs much slower when called from the idle
handler as opposed to a mousedown handler.   The same performance issue seems
to hold true in HyperCard as well.   Here's the basic setup:


on MyHandler
	do stuff
end MyHandler

on idle
    get a keystroke using the InKey XCFN
    MyHandler
end idle

on MouseDown
    get the name of the button
    MyHandler
end MouseDown

The performance of MyHandler when called from idle is about 5 times slower.
Any thoughts?  MyHandler is reached just as quickly, it just takes longer to
execute once within MyHandler handler.

I'm using the InKey XCFN in the idle loop to get keystrokes from the keyboard. 
I also have the option of mouse input.  Amazingly, little kids can handle
typing a letter on the keyboard easier than they can point a mouse at a picture
of one so I give them the option of keyboard input.

If anyone has any thoughts on how to:

    1)  get single key keyboard input rapidly or...
    2)  Any performance hints to improve SuperCard or...
    3)  Why the handler performance should vary so much, 

      I'd appreciate it!  Thanks in advance.

-Matt-  

taylorj@yvax.byu.edu (12/30/89)

Try using the ControlLock XCMD (the stack it comes in is called KeyMsg).  This
will generate a message for each key pressed, so you don't have to bother with
and idle handler.  If you can't find the XCMD, let me know and I'll mail it to
you.


Jim Taylor
Microcomputer Support for Curriculum   |
Brigham Young University               |   Bitnet: taylorj@byuvax.bitnet
101 HRCB, Provo, UT  84602             |   Internet: taylorj@yvax.byu.edu