Page Load With Tbgridview Too Slow

I’m loading a page that contains a TbGridView, with 11 lines, and it’s taking 7.5 seconds to load.

Using Yii-debug-toolbar (http://www.yiiframework.com/extension/yii-debug-toolbar/) I can see that SQL queries take 1.2 seconds. Removing the TbGridView the time is reduced in 3.5 seconds.

My questions are:

How can I reduce this load page time? I don’t need pagination or sort.

Where is the other 2.8 seconds(7.5 - 1.2 - 3.5)? How can I see it?

You have to profile your application using Xdebug.

Those page load times are huge. What’s taking so long to load on your page?

That’s what i’m trying to figure out.

Start by enabling logging output to the page. In your config:




		'log'=>array(

			'class'=>'CLogRouter',

			'routes'=>array(

				array(

					'class'=>'CFileLogRoute',

					'levels'=>'error, warning',

				),

				array(

					'class'=>'CWebLogRoute', // <- this bit

				),

			),

		),




Should I post the full log here?

You can if you wish, but you should be able to look through and see what’s taking the time. Look at consecutive timestamps for big differences.

The "big" gaps are around 30ms. Is that much? I attached the generated log