PDA

View Full Version : JSON performance went out window



Tumac
31 Jan 2010, 10:49 PM
First - I am fairly new to ExtJS. 2nd, I have googled lots of links on performance and read all the moaning, groaning and good suggestions as well.

I have been developing a nice little app that displays several pieces of data across several grids in a viewport. A dashboard of sorts.

I devlop locally on XAMPP and have had no delay issues with my JSON until recently. I have made no changes to any underlying code for my JSON calls. I retrieve my data using PHP from MySQL with CodeIgniter framework.

My app has Rowselect fucntions that when a grid row is clicked, it loads 4 other grids with apporpriate query data.

At most, the queries are returning 12 rows of data and in most of the grids only 2-3.

As I have developed and gotten things working properly, the datastore/JSON loads have been snappy.

The application load is snappy and my viewport with all the grids renders fine. The JSON returns are taking upwards of 20-25 seconds for minimal bytes.

Can someone help point me in the right direction out of the gazillion performance posts?

Even when I call the JSON function directly in my php it is taking a little dive, so I cannot see that it is totally a extjs problem. I have booted my dev box, loaded the same code on my Test environment and have same problem.

Part time devloper with enough knowledge to be dangerous (but have a good sense of what I am doing, just a little green to the harder core issues).

Mike Robinson
1 Feb 2010, 8:04 AM
Let me take a wild guess...

Is this dataset pageable? If so, do you have "{start: 0, limit: 20}" in your baseParams?

A paging toolbar works by adding these parameters to the base-parameters of the Store to which it is associated, but it only starts doing this when it is clicked! But the Store (if it is autoLoad: true), loads itself first! If there are no default values for these parameters in the initial baseParams hash, the host might be dutifully trying to "transmit the world" to you.

Beyond this, you'll need to use FireBug to watch what client and server are actually saying to each other, and you might need to correlate this with your own server logs ... and perhaps, add logging to the server-side code.

Tumac
1 Feb 2010, 8:13 AM
The datasets are not paged as they will never be big enough to page. That being said, I would have expected a big delay since the beginning, which i haven't. Even if paging is not needed, if it will help with the datasets, I can put the limits in.

I do not have autoload set for any data.

Optimal, would be to load the JSON datasets once (with autoload or call the store immediately) and then use local queries of the JSON datasets. Researching how that is done currently.

I also have my virus scanner set to not scan those directories.