phpexcelreader - PHPExcel Load Files More Than 15 seconds -
i'm using phpexcel version 1.7.9.
here php code :
$temp_name = $_files['upload']['tmp_name']; $fname = $_files['upload']['name']; $transfer = move_uploaded_file($temp_name,temp_dir.$fname); $file_location = temp_dir.$fname; $inputfiletype = phpexcel_iofactory::identify($file_location); $objreader = phpexcel_iofactory::createreader($inputfiletype); $objreader->setreaddataonly(true); $objphpexcel = $objreader->load($file_location);
for each line of code above echo time taken produce output
startup pageload in 0.0272 seconds
upload file pageload in 0.0408 seconds
identify file pageload in 0.0612 seconds
create reader pageload in 0.0613 seconds
set read data onlypageload in 0.0613 seconds
file read pageload in 17.3884 seconds
my question is, why
$objphpexcel = $objreader->load($file_location);
take 17.3884 seconds load?
other information :
- ms excel 2007
- size 384kb
- maximum column - af
- maximum row = 184 row
the same reason why phpexcel needs massive amounts of memory when writing large file disc...
a lot of data exists in excel documents, varying content, formulae, conditional markup, markup, references, cell sizes, etc...
for each cell has analysed, interpreted, matched corresponding values within phpexcel.
it's conversion proces timeconsuming , memory intensive.
you have 32 x 184 columns of data = 5888 cells have interpreted = 0.002953 seconds per table cell, 2.9ms table cell.
considering data crunching , variable happenings find pretty fast.
if want speed you'll need write own c(++) library , load php, can real speed boost.
Comments
Post a Comment