Reply to Re: process a BIG string

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация