On Tue, Aug 9, 2011 at 12:23 PM, Tracy Pearson <[email protected]> wrote:

> MB Software Solutions,  LLC wrote on 2011-08-09:
>>
>>  Here's the line:  IF ALINES(aChunks,FILETOSTR(This.InputFile)) > 0
>>
> Mike,
>
> Are you releasing the array by calling
>    RELEASE aChucks
>

I think you've got a typo there. It should be:

#DEFINE BLOW RELEASE
BLOW aChunks

If you're processing a large file (and large keeps changing in
definition), it may make more sense to read it a line at a time,
processing each line of data as you go, rather than trying to slurp
megabytes into memory, first as an unnamed string (the return of
FILETOSTR()) and then allocating again that amount of memory as an
array. Let the OS do the buffering and not VFP.

With buffered low-level file functions reading files on your local
discs, I'd hazard a guess you'll see no difference in processing time.
It's worth a few minutes of benchmarking to confirm, of course.

-- 
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/CACW6n4vM=aoytyfyiojrfbmsk43fxkyytmozoquhns8wzr3...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to