determining a plain text file

Bill Marriott wjm at wjm.org
Mon Jul 10 12:35:39 EDT 2006


Oh, that's *very* interesting, especially the hang/lockup part! I'm going to 
have to play with this a little bit.

Hard to beat 7 milliseconds vs. 6.5 seconds!

Just goes to show that shorter code is often not faster code.

Mark Smith wrote:
> On my machine (mac PB 1.5Ghz), the first replaceText approach took
> about 200 miliiiseconds on a 40k file, and about 6.5 seconds on a
> 1.3mb file,
> where as testing each char in a repeat for loop took 1 millisecond and
> 7 milliseconds respectively.
>
> The second regex approach appeared to cause Rev to hang - I got the
> spinning beach ball appearing and disappearing - so I forced quit
> after a minute or so.






More information about the use-livecode mailing list