Reply to Re: process a BIG string

Your name:

Reply:


Posted by CptDondo on 10/05/06 18:37

quamis@gmail.com wrote:
> Hy,
> i need to process every character in a file, so i open the file read
> in buffers of about 8192bytes and process each buffer, then i write
> the output to another file.
>
> 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
> $chr=ord($bufferIn{$i}); (where $i=0...8192)
> seems like all he time the script consumes is in the for loop and the
> chr/ord functions.
>
> can i do something to speed things up?
> is there any other way of acessing a single characher except
> $bufferIn{$i} ?
>

I know this may be sacrilege on this list :-), but perhaps you might
consider something like C? If all you're doing is processing single
chars, and you don't need a lot of the data structure and management
stuff PHP provides, C might be a much faster alternative....

--Yan

[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

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