Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!jkc From: jkc@Apple.COM (John Kevin Calhoun) Newsgroups: comp.sys.mac.hypercard Subject: Re: Fastest way to store long strings in real-time Message-ID: <48206@apple.Apple.COM> Date: 17 Jan 91 16:17:00 GMT References: <1991Jan16.202454.22827@smsc.sony.com> Organization: Apple Computer Inc., Cupertino, CA Lines: 22 In article <1991Jan16.202454.22827@smsc.sony.com> dce@smsc.sony.com (David Elliott) writes: >I have a program that will be grabbing chunks of data (MIDI >data, if it matters) from an XCMD in the idle loop. The >data will come in small chunks (usually less than 100 bytes), >and I want to eventually be able to put them all together >to send back to an XCMD to save them in a file. > >I read somewhere that using "put after" is not the fastest >way to go. I don't want the program to slow down after >lots of data comes in. > >What's the fastest way to store the data in this case? From the XCMD, I'd create my own block of memory by calling NewHandle and append the data to the block by calling PtrAndHand. I'd save the handle between invocations of my XCMD by storing it in a HyperTalk global. Kevin Calhoun HyperCard Team Apple Computer, Inc.