Needs a minute to read a few rows

Topics: User Forum
Jan 20, 2014 at 10:12 AM
I need to read a 7MB *.xlsx file that contains like a million cells (in 21 column rows). With the chunked reader code in the wiki I've been able to reduce the memory footprint from 1GB+ to 28MB but I still have execution time issues. In my reasonably fast developer box, it still needs more than one minute to load a couple of rows (i.e., 22 cells). This time remains constant when I load 10 or 100 rows. Am I doing something wrong or is that the expected processing time?

My code is:
$filename = '/path/to/test.xlsx';

$chunkFilter = new chunkReadFilter();
$chunkFilter->setRows(2, 1);

$oReader = PHPExcel_IOFactory::createReaderForFile($filename);
$oPHPExcel = $oReader->load($filename);
... where chunkReadFilter is copied from Reading Spreadsheet Files. So far I'm not doing anything else, just load().

My specs: PHPExcel/1.7.9 + PHP/5.5.8 on Windows 7