<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: improving performance of loading local data in jqGrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on improving performance of loading local data in jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid#p31115</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid#p31115</guid>
        	        	<description><![CDATA[<p>Hello Oleg,</p>
<p>Â </p>
<p>I have performed my tests and would say - incredible improvement.</p>
<p>My tests actually are measuring only the extend in order to isolate the fix.</p>
<p>You know that I'm very sensitive when we speak about performance.</p>
<p>Just to tell you - with your data in FireFox (only extend)</p>
<p>Â </p>
<p>Original 7650Â  - improved - 1.</p>
<p>Since I can not believed on this I have made this several time with diffrent data, but the result was the same.</p>
<p>Â </p>
<p>BIG THANKS.</p>
<p>Â </p>
<p>Best Regards</p>
<p>Tony</p>
<p>Â </p>
<p>P.S. Just merged the request.</p>
]]></description>
        	        	<pubDate>Sat, 13 Sep 2014 12:29:28 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on improving performance of loading local data in jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid#p31091</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid#p31091</guid>
        	        	<description><![CDATA[<p>I modified the demo: <a href="http://www.ok-soft-gmbh.com/jqGrid/performane-90000.htm" target="_blank">theÂ original</a>Â and <a href="http://www.ok-soft-gmbh.com/jqGrid/performane-90000__.htm" target="_blank">"the improved"</a>. Different web browsers shows different time, for example</p>
<p>IE11: original aboutÂ 830, improved about 160,Â </p>
<p>IE10: original about 600, improved about 120,</p>
<p>ChromeÂ <span style="color: #303942">37.0.2062.103: original aboutÂ 1050, improved about 130</span></p>
<p>In all tests the "improved" version worked <strong>noticeably quickly</strong>.</p>
<p>About your commentÂ rather the problem is jQuery problem or jqGrid problem. I see the problem so. If jqGrid are used with <strong>data</strong> input parameter it's not really required to make deep copy of it. My demos shows, that making deep copy of a array parameter could take relatively many time. The only parameter which can be really large isÂ <strong>data</strong>Â parameter. If jqGrid will don't use it inÂ <strong>$.extend(true,{...})</strong> then the code could be just <em>more quickly</em>. So I see the suggested change as performance optimization in jqGrid and not as workaround of some jQuery bug.Â One can suggest a lot of optimizations in jqGrid code, but the most from there will improve performance in less then 0,1%. What I suggest can improve loading of large grid <em>in multiple times</em> just by removing some operation (deep copy of <strong>data</strong>Â parameter) which are not really required for jqGrid.</p>
<p>Best regards<br />
 Oleg</p>
<p>P.S. I posted <a href="https://github.com/tonytomov/jqGrid/pull/635" target="_blank">the pull request</a>Â with the suggestions.</p>
]]></description>
        	        	<pubDate>Mon, 08 Sep 2014 14:51:13 +0300</pubDate>
        </item>
        <item>
        	<title>tony on improving performance of loading local data in jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid#p31079</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid#p31079</guid>
        	        	<description><![CDATA[<p>Hello Oleg,</p>
<p>Thanks for this investigation and examples (as usual <img class="spSmiley" style="margin:0" title="Smile" alt="Smile" src="http://www.trirand.com/blog/wp-content/forum-smileys/sf-smile.gif" />)</p>
<p>I think that this is rather problem of jqQuery and not of jqGrid.</p>
<p>I'm following the philosophy, that the problems should be resolved at its origin.</p>
<p>Â </p>
<p>I have tested your both examples (slow and fast ) in IE11 and have a impression that there is no diffrenece.</p>
<p>Do you have any measurements? I will try measure both examplesÂ  and see if there are a big difference I will accept eventually this request.</p>
<p>Â </p>
<p>Best Regards</p>
<p>Tony</p>
]]></description>
        	        	<pubDate>Mon, 08 Sep 2014 11:12:27 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on improving performance of loading local data in jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid#p31042</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/improving-performance-of-loading-local-data-in-jqgrid#p31042</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>during writing <a href="http://stackoverflow.com/a/25532422/315935" target="_blank">the answer</a>Â on theÂ stackoverflow I found out that <a href="https://github.com/tonytomov/jqGrid/blob/v4.6.0/js/grid.base.js#L770-L875" target="_blank">the line</a></p>
<div class="sfcode">
<pre class="brush-javascript syntax">var p = $.extend(true,{
    // there are here different default values of jqGrid parameters
}, $.jgrid.defaults, pin &#124;&#124;{});</pre></div><p>of jqGrid code is the bottleneck during loading of large number of local data. <a href="http://www.ok-soft-gmbh.com/jqGrid/performane-90000.htm" target="_blank">The demo</a> demonstrates the problem. It creates jqGrid with 90,000 rows of data entered directly using <strong>data: gridData</strong> input parameter. If one don't specify <strong>sortname</strong> input parameter then jqGrid displays <em>unsorted</em> data.</p>
<p>The problem is that deep version (with true as the first parameter) of <a href="http://api.jquery.com/jquery.extend/" target="_blank">$.extend</a> works very slowly with arrays. Especially slowly works <a href="http://api.jquery.com/jquery.extend/" target="_blank">$.extend</a> in Internet Explorer. To improve performance one can either use non-deep <a href="http://api.jquery.com/jquery.extend/" target="_blank">$.extend</a> (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 <a href="http://api.jquery.com/jquery.extend/" target="_blank">$.extend</a>:</p>
<div class="sfcode">
<pre class="brush-javascript syntax">var localData;
if (pin != null &#38;&#38; pin.data !== undefined) {
    localData = pin.data;
    pin.data = [];
}
var p = $.extend(true,{
    // there are here different default values of jqGrid parameters
}, $.jgrid.defaults, pin &#124;&#124;{});
if (localData !== undefined) {
    p.data = localData;
}</pre></div><p><a href="http://www.ok-soft-gmbh.com/jqGrid/performane-90000__.htm" target="_blank">The demo</a>Â uses jqGrid code <a href="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.6.0/js/jquery.jqGrid.src-NotExtendLocalData.js" target="_blank">fixed in the described above way</a>Â 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 <a href="https://github.com/tonytomov/jqGrid/pull/631" target="_blank">another pending pull</a>Â request which I posted before.</p>
<p>Best regards<br />
 Oleg</p>
]]></description>
        	        	<pubDate>Sun, 31 Aug 2014 10:06:09 +0300</pubDate>
        </item>
</channel>
</rss>