I have a report generator function in my controller. At the end of the function I'm placed a
$before = microtime(true);
Then I'm working with this PHPExcel, setting the headers, the result, which is 140 lines of data in the xml.
$reporter->setResult($result)
->export(new ClientReport())
->save('php://output');
When I'm returning with the function, I'm using this line:
return microtime(true) - $before;
so, with these lines I'm measuring the runing time of the function, and I got 6.979903936386108 microsecounds as result of the function. However, when I check this in the web-browser's network inspector, then i got 7.5 secundum as result. With 400 lines of datas i got 26 sec, which have nothing to do with the time i'm measuring in the function. My question is: how is this possible, and how could I speed up this generating time? Because of this I can't generate a report with a little bit more datas, because it's so slow.