RE: [PHP] Very Large text file parsing

From: Date: Thu, 20 Sep 2007 13:02:20 +0000
Subject: RE: [PHP] Very Large text file parsing
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-262293@lists.php.net to get a copy of this message
Paul Scott wrote: > Code: > [SNIP] > $row = 1; > $handle = fopen($csvfile, "r"); > while (($data = fgetcsv($handle, 1000, "\t")) !== FALSE) { > $num = count($data); > $row++; > $insarr = array('userid' => $userid, > 'geonameid' => $data[0], [snip] > $this->objDbGeo->insertRecord($insarr); > //$arr[] = $data; > } > fclose($handle); For that sort of thing, I'd forget about PHP and just use multi-threaded C. Especially if you've got an SMP machine. /Per Jessen, Zürich

« previous php.general (#262293) next »