Yiibooster Seems Slow

When I added Yiibooster library to my website, it seems to slow page loading. When I remove the Yiibooster files, it becomes fast again.

It is slow without using any Yiibooster components. when I click on ‘Home’, 'About, or ‘Contact us’ link, the page gets blanked “white” and loads after 2 seconds.

www.jrowser.com, my test site. This is on a dedicated server.

Any ideas?


I also have this problem. :(

Since all bootstrap files are preloaded, I tried to remove some files that I don’t think I will be using, especially the folder bootstrap/assets/js/ckeditor, which is more than 3MB. I’m not sure if this is good or if it won’t cause problems in the future, but it helped the page loading speed.

Please, check the following function on the bootstrap/components/Bootstrap component:

public function getAssetsUrl()


                if (isset($this->_assetsUrl))

                        return $this->_assetsUrl;



                        $assetsPath = Yii::getPathOfAlias('bootstrap.assets');

                        $assetsUrl = Yii::app()->assetManager->publish($assetsPath, false, -1, YII_DEBUG); // <----- Your YII_DEBUG is telling whether to forceCopy or not

                        return $this->_assetsUrl = $assetsUrl;



Replace YII_DEBUG by false

See the result.

Hopefully it will work.

It does! Thank you. :)


Wow, this does work. My page went from like 6 seconds to like… less than a second.

Is there a particular reason why this works?


Ahh there was a comment on the extension page, saying:

Hello, new releases republish assets if you are in DEBUG mode, If you set Yii to production mode it will solve timming problem

// remove the following lines when in production mode

defined(‘YII_DEBUG’) or define(‘YII_DEBUG’,true);

Other thing you can do: edit Bootstrap component and in line 458:

$assetsUrl = Yii::app()->assetManager->publish($assetsPath, false, -1, false);

is what i do in every bootsrap update to my file, theres no need to wait in debug mode

This problem was driving me nuts. Thanks for the help!

Cheers, Whit

Can’t tell you how many times I’ve had to open up my entry script and toggle debugging to avoid the loads :lol:

Thanks for the quick fix.

@bit0123 thank you man

It should be published in the booster’s webpage


i realized a test on a fresh generated app on my localhost using the apache ab tool, sending 1000 requests, five at a time to the contact page :

ab -n 1000 -c 5 http//localhost/myProject/index.php?r=site/contact

the results where:

  • when using default Chris’s bootsrtap -> the website can process 20.07 requests per second.

  • when using the default booster -> the website can process 1.41 requests per second.

  • when using booster after replacing YII_DEBUG by false on bootstrap/components/Bootstrap (line 458) -> the website can process 21.89 requests per second. wish is almost the same as the first test.

i think that @bit0123 solution is a must do when we are in production. the gain in speed is more than 15 times.

But i have still the feeling that Yiibooster is too slow. Compare to a fresh generated site the difference is pretty big. :frowning:

exactly 24.46 requests per second is what the same app that i’m testing can process in my localhost when using yii’s default theme with the blueprint css framework.

i suppose that things will be different when a project become more complex and after use of more booster components. maybe we got to test that later & compare with other css themes or frameworks. but for now. the beauty of my fresh app thanks to booster & twitter’s bootstrap is worth

Consider to take some research from yiiboilerplate master project, YiiBooster was included, maybe there are some miscunfiguration on your project.

thank’s!!! after a day i’m going crazy this is the solution!!! ;) thank’s!!!!

  • 1 for the simple solution :) it works just perfect