Hello Tony,
the analyse of performance of jqGrid with large number of rows have shown that there are two most expensive lines: the lineÂ
1 |
$("#"+$.jgrid.jqID(ts.p.id)+" tbody:first").append(rowData.join('')); |
where the grid body will be placed to the HTML page and the lineÂ
1 |
if(!ts.p.treeGrid && !ts.p.scroll) {ts.grid.bDiv.scrollTop = 0;} |
 where will be made unneeded work because the value of ts.grid.bDiv.scrollTop seems be always 0 in the if condition (because of calling emptyRows in the line).
I suggest first replace the line $(“#”+$.jgrid.jqID(ts.p.id)+” tbody:first”).append(rowData.join(”)); to the following
1 |
ts.firstElementChild.innerHTML += rowData.join(''); |
The demo demonstrates the performance of original jqGrid with 1000 rows per page from 90000 total rows and the same demo with the fixed code seems to works quickly in all browsers where I tested it. The most benefit I could see in Internet explorer, but other web browser shown different coefficient of advantage by different number of visible rows, nevertheless the suggested modification seems to work always more quickly.
Best regards
Oleg
P.S. One can do the same modification in the code of addXmlData.
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top