Hello Tony,
during writing the answer on the stackoverflow I found out that the line
1 2 3 |
var p = $.extend(true,{<br /> // there are here different default values of jqGrid parameters<br /> }, $.jgrid.defaults, pin ||{}); |
of jqGrid code is the bottleneck during loading of large number of local data. The demo demonstrates the problem. It creates jqGrid with 90,000 rows of data entered directly using data: gridData input parameter. If one don’t specify sortname input parameter then jqGrid displays unsorted data.
The problem is that deep version (with true as the first parameter) of $.extend works very slowly with arrays. Especially slowly works $.extend in Internet Explorer. To improve performance one can either use non-deep $.extend (but one can have some compatibility issues) or just temporary remove data parameter from the list of input parameters and include it back after the call of $.extend:
1 2 3 4 5 6 7 8 9 10 11 |
var localData;<br /> if (pin != null && pin.data !== undefined) {<br /> localData = pin.data;<br /> pin.data = [];<br /> }<br /> var p = $.extend(true,{<br /> // there are here different default values of jqGrid parameters<br /> }, $.jgrid.defaults, pin ||{});<br /> if (localData !== undefined) {<br /> p.data = localData;<br /> } |
The demo uses jqGrid code fixed in the described above way and it works much quickly especially in Internet Explorer. I suggest to fix the main code of jqGrid in the way. I didn’t posted the above changes as new pull request only because there are exist another pending pull request which I posted before.
Best regards
Oleg
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top