Re: Reading really big text files
Re: Reading really big text files
- Subject: Re: Reading really big text files
- From: Shane Stanley <email@hidden>
- Date: Wed, 23 Jan 2002 08:17:41 +1100
On 23/1/02 5:06 AM +1000, Wadson, David, email@hidden,
wrote:
>
What's the best way to read a really big tab-delimited text file into an
>
Applescript? The data file I have is about 2.7MB, with 4000+ lines in it.
>
When I try to read the whole file into a list using the File Read/Write
>
commands from the Standard Additions, I get an out of memory error. I recall
>
reading somewhere that there is a glitch that prevents really big files from
>
being read. Is there a better option available?
You have two options: read it in chunks (using "read for x" and not "read
before/until y"), or save it in a droplet and give it a very big memory
partition. (Aside: I wonder how X affects the latter.)
>
>
Also, am I going to max out some limit for items in a list in Applescript or
>
is it simply a matter of cranking the amount of RAM I give to the applet?
Long lists slow things down exponentially. Work on chunks.
--
Shane Stanley, email@hidden