On Tue, 06 Jan 2009 14:06:22 Brenda Wallace wrote: > Looks to me like you're reading the whole giant file into memory - as > well as doing a regex on the whole file. > how about reading the file in smaller chunks and doing the regext on a > per chunk basis. > Also, do you really want to put all the result in to an array? that > variable could get large. > how about just echoing so it can be redirected to a file.
Sorry, Maybe I don't quite understand what you're saying but- 1. Each text file scanned (stored on the file system) is only a few kB. 2. Even if the (collective results of each preg_match_all() pass) array ended up with one or two million records, how much RAM does this need? (The system has 4Gb, possibly going to be upgraded to 8Gb). Thanks, Michael --~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] -~----------~----~----~----~------~----~------~--~---
