I have the following code:
$objReader = \PHPExcel_IOFactory::createReader($inputFileType);
$objReader->setReadDataOnly(true);
$objPHPExcel = $objReader->load($inputFileName);
The 3rd line takes almost a minute inside Yii2 project. When I load the same file in a standalone php file, it loads instantly. I believe it is related to the autoload functionality but not sure how to resolve it. Does anyone have any insight?