Phpexcel - Slow Load Of Simple Xls File

I have the following code:

        $objReader = \PHPExcel_IOFactory::createReader($inputFileType);


        $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?

Did you ever solve it? I have the same problem.

add require statement on your own?