Why Is Yii So Slow?

I have evaluated YiiFramework using a testdrive demo project.

I installed the yii-user-management module and noticed peformance of the user module index page takes 3-4 seconds to load.

I analyzed the code and noticed, it is not the code of the module, it is the Yii internals.

even the many calls of "dirname" took over 1 second.

Why is this and is there any plans to improve this in yii 2.0 ?

I started modifying the Yii framework code - but this is a bit tedious.



Please be more specific.

It’s more than just tedious. It’s highly disregarded.


dirname is php function so the problem is with php and your server

could you give us more details about that ?

Turn off debug mode…

-> an empty testdrive / hello world project following the yii tutorial

-> I added the yii-user-management module

I can fork it and committ back to the yii core. Why disregarded? Someone has to do this job sooner or later…even if there is no way around dirname, it should only be called a single time for a page request.

It is the latest Xampp on Windows 64 bit (2 completely different machines, reproducable)

Run a simple PHP script using dirname function (without Yii framework)

What is the result ?

A single call of dirname is relatively fast of course…

However I do not know how reliable Xdebug output is.

Could somebody else post a Xdebug output for a "complex" Yiipage? Preferably xampp and win64

disable profiler, PHP is writing Mbs of garbage, that’s the reason

even 1k of dirname cannot degrade performance enough