the large file challenge

Sadhunathan Nadesan sadhu at castandcrew.com
Sun Nov 10 12:57:01 EST 2002


| I'm confused:  if the point is to avoid reading the entire file into memory,
| isn't what what line 8 does?  And if it's already in memory, why is it read
| again inside the loop?
| 
| I think I missed something from the original post....



Hi

Sorry, yes you missed something but not from the original post, the
part you missed wasn't posted at all.

It went like this

1.  (not posted) - conversation in progress regarding the difference 
between compiled programs, like C, and interpreted programs, like
Metacard.

2. (not posted) example sent of a shell script (bash or bourne shell)
on Unix - interpreted of course - and Pascal program doing the same
thing - compiled of course.  Question asked:  how  would one do this in MC?
I am not an experienced MC developer and I had no idea.

3. (not posted) a code snippet was sent to me as an example and I turned
this into a working program.  Yes it starts out by reading the whole file
to count the lines which is not very efficient.  In fact it failed when
run on the large access file with an out of memory error.

4. (where you came in) - I sent a post inquiring, basically, isn't there
a better way?

I got a lot of good responses and it seems there are much better
ways, so I am going to try them all.  

Clear it up for you?

Sadhu



More information about the metacard mailing list