Next version will include TbResponsiveGridView which will work as the Zurb tables (having left side column fixed and the others scrollable). The one that you proposed works with media queries and I am not sure if we should create those queries automatically and register them… what do you guys think?
However, I’m worried about the performance drop that I experimented after changing from yii-bootstrap to yiiboster. On my local development environment Firebug is reporting 1.64 s to load a page with a 5-row TbGridView, which is compared to 844 ms using yii-bootstrap.
Have you tested performance? Do you consider this difference to be normal? I’m not worried about the numbers, but the application now “feels” slow
Have you test it after subsequent calls and make sure the library is not re-registering the assets?
Obviously the library takes more time to register the assets because it is much bigger… Please, check the website: http://yii-booster.clevertech.biz is it slow?
And if you are just using TbGridView the rendering is actually the same… please, make sure you do not re-register the assets per page reload.
We do use YiiBooster in all our projects and we have no issues at all.
I am testing the same project and page. The only difference between the two results is the extension being used. Tests on other pages have similar results.
My local development environment might not be resource powerful, and I know that on a live server it may not be so noticeable, but I’m wondering about this performance difference in terms of proportions… is it normal that YiiBooster seems to take more than double of time to load the exact same page than yii-bootstrap?
Please, check the following function on the bootstrap/components/Bootstrap component:
/**
* Returns the URL to the published assets folder.
* @return string the URL
*/
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;
}
}
Again, takes more time, because during development the assets are copied again and again, and this library is already huge. Afterwards, would be according to your use of the widgets and components taking into account that some of the objects may take a bit more time to load as there is more code to interpret.
The code I am using is from the Gii Bootstrap Generator. I have made no changes to the yii-booster css, etc.
I have a TBActiveform containing multiple elements and I want to replace the Check boxes with Toggle Buttons (but the code below only show the two check boxes I would like to appear on a single row)
I appreciate that you pointed me out that function where the forceCopy property was dependent on the YII_DEBUG parameter. I read the Yii documentation and now I understand better the behavior.
Setting forceCopy to false speeds up the application performance.
Instead of using the form’s toggleButtonRow method use the TbToggleButton widget directly (check the TbInputHorizontal or TbInputVertical for its use), then wrap the two widgets within a '<div class=“control-group”> … widgets here (you may have to style them up yourself… ‘</div>’. It is a CInputWidget extended class so you can also use $model with it but you will have to prepend the labels.