[comp.sys.mac.hypercard] XCMD call backs to Card, faster?

ffdkl@acad3.alaska.edu (LaSota Daniel K) (12/19/90)

XCMD's can tell HyperCard to execute HyperTalk routines.
Has anyone examined the speed difference?
For instance if HyperTalk gets this command:
	
	drag from point1 to point2

how would it compare to an equivalent command passed directly
to HyperCard from an XCMD?
I'd just be kinda interested before writing any such XCMD's.

Ant Man!
Dan LaSota
ffdkl@acad3.alaska.edu

jdevoto@Apple.COM (Jeanne A. E. DeVoto) (12/20/90)

In article <1990Dec18.221327.11822@ims.alaska.edu>
ffdkl@acad3.alaska.edu writes:
>XCMD's can tell HyperCard to execute HyperTalk routines.
>Has anyone examined the speed difference?
>I'd just be kinda interested before writing any such XCMD's.

Don't bother. XCMDs, as you say, "tell HyperCard to execute HyperTalk 
routines." Calling a command from a script results in the same code being
executed as is called when an XCMD uses the SendHCMessage callback.
You would expect from this that it takes about the same amount of time
to process an XCMD callback as to process the equivalent HyperTalk;
however, in practice, calling an XCMD takes so much overhead -- particularly
if you're trying to send each HyperTalk line separately -- that your
stack will slow to a crawl. We're talking speed differences of 10 to 1
for simple commands, or worse.
-- 
========= jeanne a. e. devoto ========================================
 jdevoto@apple.com     |  You may not distribute this article under a
 jdevoto@well.sf.ca.us |  compilation copyright without my permission.
______________________________________________________________________
 Apple Computer and I are not authorized      |        CI$: 72411,165
 to speak for each other.                     |