Re: Trouble reading large text files
Re: Trouble reading large text files
- Subject: Re: Trouble reading large text files
- From: bob anderson <email@hidden>
- Date: Sat, 19 May 2001 21:17:36 -0400
AppleScript is not the best tool for processing large test files
directly. You would do better to script BBEdit. It can handle
large test files limited only by the amount of built-in memory
you have.
If you need something that will process text-files really
fast and have no memory limitations, try Perl. AppleScript
and Perl can co-exist very nicely. I use AppleScript to
control the functions of other programs and use Perl to
mung big files (20 MB and up) really fast.
Regards,
Bob Anderson
>
Date: Mon, 14 May 2001 18:32:57 -0400
>
Subject: Trouble reading large text files
>
From: Matthew Broms <email@hidden>
>
To: <email@hidden>
>
>
I'm having a very difficult time reading in a folder of text files (about
>
10). I drop the folder on the application for processing, read them in one
>
by one, process the text, and move onto the next. I'm simply doing a:
>
>
set rawData to read file myFilePath
>
>
About 2 out of 10 of these text files are rather large - between 1mb and
>
2mb. The strange thing is I have to do this process in several areas of my
>
script and in some areas it works flawlessly every time (through ALL 10 - no
>
matter the file size) and in others it dies when it gets to one of the large
>
text files (Out of Memory error). The memory block is set to 20mb for the
>
application.
>
>
I'm pulling my hair out because I don't know why in one section it works
>
while the other it fails every time on the large documents. In fact, the
>
area in which it fails was added later and was simply copied and pasted from
>
the area it works. The newer, failing loop begins and ends before the
>
working one starts (it is supposed to just do a count of items to process
>
before the actual process begins).
>
>
Matt