Extracting a subset of lines from a large file

MisterX x at monsieurx.com
Wed Jul 2 01:04:00 EDT 2003


Gregory,

the url will force the file to be read completely.
for those cases (but not for over 30MB's) it's better to store the data into
a variable and
treat it in a loop after.

In your case, read the file using the read file command. Try to optimize a
buffer for your
reading (32-64K's may be best... but experiment!)

Stocking the data temporarily in a field will definitely slow down things...
try to keep that
for last... Memory is the fastest you got!

cheers
Xavier

> -----Original Message-----
> From: metacard-admin at lists.runrev.com
> [mailto:metacard-admin at lists.runrev.com]On Behalf Of Gregory Lypny
> Sent: Tuesday, 01 July, 2003 22:44
> To: metacard at lists.runrev.com
> Subject: Extracting a subset of lines from a large file
>
>
> Hello everyone,
>
> 	I want to take a chunk of 1000 lines at a time out of a
> text file and
> display it in a field.  Some of the text files are big, 200 MB and up.
>
> 	Is one of the following approaches preferred?
>
> [1]	put line 1 to 1000 of url ("file:" & filePath) into field "X"
>
> [2]	read from file filePath from line 1 for 1000 lines
> 	put it into field "X"
>
>
> 	Regards,
>
> 		Gregory
>
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard
>




More information about the metacard mailing list