read from file until a line begins with a certain word

Colin Holgate colinholgate at
Sun Sep 17 00:20:15 EDT 2017

One thought, what if you read overlapping chunks. Like, read from 0-10000, then from 9900-20000, etc. If the overlap is longer than your test string you would still be able to pick it up, in the cases where the string spanned the chunk boundary.

First test could be to read in 10000 chunks and time how long that takes compared to reading in 1000000 at a time, or 1000000000 at a time. There may be a sweet spot where reading in the text is fast enough to not bother with reading in smaller chunks.

> On Sep 16, 2017, at 9:11 PM, dunbarx via use-livecode <use-livecode at> wrote:
> I would just read the whole file and then let LC truncate the text following
> the keyword sentence in the usual ways. I bet even with a couple of
> gigabytes this would not take much time.
> Craig Newman
> --
> Sent from:
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list