Xref: utzoo comp.sys.mac.hypercard:4097 comp.sys.mac.programmer:16275 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!stadler From: stadler@Apple.COM (Andy Stadler) Newsgroups: comp.sys.mac.hypercard,comp.sys.mac.programmer Subject: Re: global variables in code resources Keywords: global variables, code resources, XCMD's, XFCN's Message-ID: <43407@apple.Apple.COM> Date: 27 Jul 90 22:16:11 GMT References: <12642@june.cs.washington.edu> Organization: Apple Computer Inc, Cupertino, CA Lines: 21 >How much do callbacks to HyperCard from externals slow the execution >of an Xternal? The callback mechanism itself is very quick and direct. Low overhead. >Along the same lines is it faster to execute HyperTalk >commands from within a script of is it faster to make callbacks >from the Xternal's code? If you are doing something which can be handled through one of the specific function callback (like SetGlobal or GetFieldByXXX or NumToStr) then by all means use the callback - it will be quite efficient. If you are just sending single lines of HyperTalk, through SendCardMessage, SendHCMessage, or EvalExpr, however, the interpreter will actually have to parse, tokenize, interpret, and execute your line. This won't make much difference if you do it a single time; but the interpreter tokenizes scripts and keeps the tokens around, which means that -repeated- execution of a given line will be much faster if it's in a script. --Andy stadler@apple.com