Home › Forums › Guriddo jqGrid JS › Discussion › JQGrid data loading performace
I tried to use JQGrid (version 3.4.3, revision 84 from 2009-03-12) in an application where one table had 7 columns of text, 1 column with a checkbox and other column with 2 image links – so 9 columns. The average table size in this application is 100 rows.
Hello,
Thanks for this tests. It is well known that IE6 when using ajax calls is one of the slowest browsers. For me these tests should be considered only if they are compared in other browsers. Also if possible could you please make two comparations
datatype: function (data) {
var starttime1 = // first start
$.ajax({
…
complete: function (mydata,status) {
var starttime2 = // second start-
addJSONData here
stop first timer
stop second timer
})
}
This will be very interested.
Regards
Tony
Hi,
Sorry that I did not mention clearly, but those times were the elapsed times only for the “addJSONData” JQGrid function. So, the times are only for the second timer from your code.
Before using JQGrid plugin into the project I wanted to test it first. I did not even used AJAX calls with this test. The data were taken from a JavaScript file, that contains a JSON representation string of the data.
Hello,
You are right. After lot of investigatios and performance test I realized that jqGrid have problems with loading big sets >150 rows. After two days work I make some changes in 3.5 version where the speed (in certain cases) is 5-10 time faster.
With other words – beta release will have these improvements. Hope to publish soon. Actually I need a day or two to document all changes in the new version.
Thanks
Regards
Tony
Hi,
Because I have tested some grid plugins over the internet and found out that JQGrid is one of the best, I have also taken a quick look into the JQGrid plugin code.
I’ve seen that you used 'document.createElement' JavaScript command, to create DOM elements that are added to the page. I’ve made a test and build an identical table (with same number and content for the columns) with 500 rows using 'innerHTML' command.
The time to load for the table was 0.7 seconds in IE 6 on a Pentium dual core processor (2.13 GHz) with 2GB of RAM. When using document.createElement JavaScript command for the same table with 500 rows the time was 2.3 seconds on the same computer.
Did you considered in your new version of the JQGrid to change the way DOM elements are created?
Do you know what could cause the delay in JQGrid code, so that to exist that difference from 2.3 seconds to 13 seconds (except the DOM creation issue)?
Hello,
Thank you for these investigations and tests. You help me a lot to improve the performance.
Actually the bad thing in 3.4 and in 3.5 alfa3 is that there are a lot of jQuery operators when adding data to the grid. This slow down the performance a lot.
I succesed to construct only strings (in my case array) and call jQuery only when the data is appened. I have added two options – load data at once or row by row when we have treegrid, subgrid and afterinsert event.
In first case the speed is about 10 time fater in the second 3-5 time faster compared to previous
I tested the new version of JQGrid (3.5 beta, build4).
For 500 rows and 9 columns, in IE 6, on a Pentium dual core processor (2.13 GHz) with 2GB of RAM, the time to load the table is aproximatively 4.5 seconds.
There was an improvement of 3 times from the previously 13 seconds !
The time to load for a table of 500 rows and 9 columns, using the 'innerHTML' command, was 0.7 seconds on the same computer.
Do you think that the difference of almost 6 times comes from the JQuery core ?
Did you change something about the way the plugin should be used so that to obtain better performances (because I used it in
Hello,
Thanks for investigations again. Did you try with parameter
gridview : true ? , where all the data is puted at once.
Some other additional nothes
since you put
datatype:function(..) {
start time
…addJSONData()
enndtime – starttime
}
this is not real check becouse
Yes, I used 'gridview : true ' parameter when
Hello,
Thanks again. Also as of my previous post we do a lot of other
Hi,
Regarding the resize feature, it worked fine in IE 6, even with 500 rows in previous version of JQGrid. So, there was something changed in this version of the plugin. Will this new feature (that had an impact on the resize feature)
Hello,
Thanks again. Do you have try with other grid components like Ext Grid in order to compare? Also if you load data direct in a table with innerHtml of course it will be quicker – you understand what I mean. Here we have a complex data grid component and it is not possible to do just simple appending of the data.
Best Regards
Tony
Hi Tony, could you add the following to the resizing, this make it much more quicker on IE.
The slow resizing was due to the selector used in dragStart and dragMove again and again, and IE is really bad at it, so I added a local variable named curGbox (I didn't know how to name it).
I also added some lines to prevent IE from highlighting selected text while scrolling… hope you keep it too ?
Done on the latest beta (12)
Really nice job on JQGrid BTW. Do you have any idea of when a 3.5 final may come out ?
dragStart: function(i,x,y) {
Hello,
Thanks
I do not jet have tested this, but it seems ok and reasonable.
Will perform some test and if all is ok will fix it.
The final 3.5 will come soon.
Best Regards
Tony
HEllo,
Thanks, it really work better in IE.
Patch included
Best Regards
Tony
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top