On 8/7/99 10:10 AM, [EMAIL PROTECTED] 
([EMAIL PROTECTED]) wrote:

>From: "Richard MacLemale" <[EMAIL PROTECTED]>
>Subject: Son of RAM Question...
>Date: Sat, 07 Aug 1999 10:55:01 -0400
>MIME-Version: 1.0
>Content-Type: text/plain; charset="US-ASCII"
>Content-Transfer-Encoding: 7bit
>
>If I keep this thread up, eventually I'll be able to use some really cool 
>names... "Beneath the Planet of RAM Questions, RAM Question vs. Godzilla, I
>Was a Teenage RAM Question...."
>
>Anyway, I found something interesting (and probably already obvious to some
>folks).  I was having a problem when I opened a stack with a field that had
>about 1 MB worth of data, and then loaded that data into RAM... the process
>added over 10 MB to my app's RAM consumption.
>
>I took the same data and put it into a text file, then instead of opening
>the stack and loading the field into RAM, I just opened the text file and
>loaded IT into RAM.  What a difference!  Instead of adding over 10 MB to my
>RAM consumption, it added slightly under 4 MB.  And when I dumped it, I got
>about 3 MB of the 4 MB back.
>
>This makes sense when you consider that by opening the stack and then
>reading the field into a variable, I actually ended up with the same info in
>RAM twice... once in the variable and once in the open stack.
>
>The moral of the story - if you have to read data, read it from a file if
>possible.  It will happen faster (no stack to open), and take less RAM.  AND
>you get more RAM back when you dump the contents of the variable.  Just what
>I needed!
>
>:)
>Richard MacLemale
>coolclassroom.com

this is a great trick ive used on several cdrom projects with hypercard 
that were very text intensive (one was an encyclopedia, so lots of text). 
really helped the load speed by reading the bulk of the text from text 
files using rtf instead of holding them in fields. also helped what i 
think was memory issues with the several externals we were using when 
testing for extended use periods.

cheers,

jeff

-------------------       ---------       --------------------
Jeffrey H. Reynolds       Waveforms       [EMAIL PROTECTED]
-------------------       ---------       --------------------
                   \.          |\
                    \`.___---~~  ~~~--_
                    //~~----___ ((_o_-~
                   '           |/'
                     

Reply via email to