3 megs of text

Ralf K=?ISO-8859-1?B?9g==?=nner koenner at t-online.de
Mon Mar 4 17:05:00 EST 2002

Dear List,

may be some of you might have the right solution for this task:

I have about 3 MB of text data in one single logfile which I need to parse
and do some maths for time and date manipulations with. I don't want to go
through every single line of it - it simply would take far too much time.

Each line has 3 items: gDate,gTime,"text_A" or "text_B" or "text_rubbish".

1.) I need to get rid of every line that contains "text_rubbish" (item 3).
2.) If "text_A" in line i is followed by "text_b" in line i+1 then add
(gTime of line i+1) minus (gTime of line i) to spentTime and 3.) put gDate
into dateList.

A 480 KB file took my G3/233 about 18 minutes to do this by using "normal"
repeat loops with 1 if-then-else statement inside.

Any ideas to speed this up?

Thank you very much for any help and best regards,


More information about the use-livecode mailing list