Posted by Colin McKinnon on 10/05/06 19:20
quamis@gmail.com wrote:
>
> the problem is that with large files(>8Mb) i get a script error(Fatal
> error: Maximum execution time of 30 seconds exceeded ).
> i acess every character in the buffer with
<snip>
> can i do something to speed things up?
Not without resolving the problem of why you need to examine each char.
I would suggest that you before commencing the processing you put:
set_time_limit(0);
ignore_user_abort(); // in case your browser timeout.
....then in the read loop but ouitside the char loop provide a machanism for
stopping runaways:
if ((rand(0,20)==10) && (file_exists("break")) {
break;
}
C.
[Back to original message]
|