Yiibooster Seems Slow Yiibooster Seems Slow
#1
Posted 17 November 2012 - 06:11 PM
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?
Thx
#2
Posted 27 November 2012 - 10:45 AM
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.
#3
Posted 27 November 2012 - 11:09 AM
Zibnimer, on 17 November 2012 - 06:11 PM, said:
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?
Thx
Please, check the following function on the bootstrap/components/Bootstrap component:
public function getAssetsUrl()
{
if (isset($this->_assetsUrl))
return $this->_assetsUrl;
else
{
$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.
#4
Posted 27 November 2012 - 11:24 AM
bit0123, on 27 November 2012 - 11:09 AM, said:
public function getAssetsUrl()
{
if (isset($this->_assetsUrl))
return $this->_assetsUrl;
else
{
$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.
#6
Posted 13 December 2012 - 03:33 PM
Is there a particular reason why this works?
Edit:
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
#7
Posted 13 December 2012 - 07:41 PM
Cheers, Whit
#8
Posted 28 December 2012 - 05:43 PM
Thanks for the quick fix.
#9
Posted 15 January 2013 - 09:49 AM
It should be published in the booster's webpage
bye!
#10
Posted 24 January 2013 - 09:28 AM
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.
#11
Posted 24 January 2013 - 10:25 AM
salem, on 24 January 2013 - 09:28 AM, said:
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. :-(
#12
Posted 25 January 2013 - 04:27 PM
Franker, on 24 January 2013 - 10:25 AM, said:
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
#13
Posted 27 March 2013 - 04:20 AM
Zibnimer, on 17 November 2012 - 06:11 PM, said:
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?
Thx
Consider to take some research from yiiboilerplate master project, YiiBooster was included, maybe there are some miscunfiguration on your project.

Help














