Re: File Write Operation Slows to a Crawl....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jochem Maas wrote:
> I read that you already got your script performance up,
> but I'd still like to suggest that you shouldn't be reading in
> a complete 18Mb file (especially given that you don't know
> in advance whether some day(s) this size might be much larger).
> 
> instead you should be opening a handle to the file and then
> read in, parse, & write out the parse results one line at a time.
> 
> to get an idea of what I mean take a good look at this page of the manual:
> 
> http://php.net/manual/en/function.fgets.php
> 

Or even better, as I've read that it's much faster:  stream_get_line()

-- 
Thanks!
-Shawn
http://www.spidean.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux