<?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: Performance improvements for remapColumns</title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/performance-improvements-for-remapcolumns</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/discussion/performance-improvements-for-remapcolumns/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>2late2die on Performance improvements for remapColumns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/performance-improvements-for-remapcolumns#p24310</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/performance-improvements-for-remapcolumns#p24310</guid>
        	        	<description><![CDATA[<p>Oh I already saw those and have them in my code, and they do improve the performance but they&#39;re different from my modifications above.</p>
]]></description>
        	        	<pubDate>Tue, 16 Aug 2011 20:31:24 +0300</pubDate>
        </item>
        <item>
        	<title>OlegK on Performance improvements for remapColumns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/performance-improvements-for-remapcolumns#p24307</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/performance-improvements-for-remapcolumns#p24307</guid>
        	        	<description><![CDATA[<p>If you made some reset with ColumnChooser try to repeat the test after the simple fix described <a href="/blog/?page_id=393/bugs/performance-improvement-in-hidecol-and-showcol-for-grid-with-many-rows/" target="_blank">here</a>. The fix is already in the github code.</p>
]]></description>
        	        	<pubDate>Tue, 16 Aug 2011 18:36:43 +0300</pubDate>
        </item>
        <item>
        	<title>2late2die on Performance improvements for remapColumns</title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/performance-improvements-for-remapcolumns#p24304</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/performance-improvements-for-remapcolumns#p24304</guid>
        	        	<description><![CDATA[<p>I&#39;ve implemented some performance improvements to remapColumns function, but I couldn&#39;t do properly exhaustive testing, and I&#39;m also not very deeply familiar with jqGrid. So what I&#39;m saying is, these changes might negatively affect something I didn&#39;t think of, so if anyone has the inclination to do some further testing I&#39;d appreciate it. Or even just take a look at the code and double check I&#39;m not doing something stupid.</p>
</p>
<p>In any case, I&#39;ve forked jqGrid on github and <a href="https://github.com/iliadraznin/jqGrid/commit/acb3bdc811e751ca884ec254ddbf44ccdfac8fbe" target="_blank">here are the changes to grid.base.js</a>. They are fairly straitforward but here&#39;s a quick outline.</p>
<ul>
<li>Put a check to make sure the remap is actually needed. remapColumns is called by columnChooser (and possibly other functions) with original order, so I run a quick loop and make sure to only proceed if there&#39;s been a change in the order of columns.</li>
<li>Replaced $.each loops in both resortArray and resortRows with for loops.</li>
<li>Changed rows selectors to use parent.find instead having parent as context (tiny improvement but also costs nothing).</li>
</ul>
<p>The actual improvements in speed ended up being only about 10% (my data has 345 rows and 13 columns). However, the number of calls made was reduced almost five times. (I used firebug&#39;s console.profile to get these numbers)</p>
]]></description>
        	        	<pubDate>Tue, 16 Aug 2011 17:24:58 +0300</pubDate>
        </item>
</channel>
</rss>