<?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: case sensitive sorting of local data not work</title>
	<link>http://www.trirand.com/blog/?page_id=393/bugs/case-sensitive-sorting-of-local-data-not-work</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/case-sensitive-sorting-of-local-data-not-work/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>OlegK on case sensitive sorting of local data not work</title>
        	<link>http://www.trirand.com/blog/?page_id=393/bugs/case-sensitive-sorting-of-local-data-not-work#p28055</link>
        	<category>Bugs</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/bugs/case-sensitive-sorting-of-local-data-not-work#p28055</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>current implementation of jqGrid implement local sorting always case insensitive independent from the value of <strong>ignoreCase</strong>. In&#160;<a href="https://github.com/tonytomov/jqGrid/pull/407" target="_blank">the pull request</a>&#160;are described minimal changes for fixing the problem.</p>
<p>Best regards<br />Oleg</p>
<p>P.S. I think that one can improve performance of sorting additionally by reducing code of <strong>_compare</strong> used in sorting (not for searching) and by deviding <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L311-L337" target="_blank">one long code</a>&#160;into parts for different types.</p>
<p>What I mean under reducing of the code is following: the values used for sorting will be first normalized in <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L388-L390" target="_blank">the lines</a>. So every value used for camparing will be first normalized <span style="text-decoration: underline;"><strong>once</strong></span>. Then it can be used inside of <strong>_compare</strong>&#160;multiple times. Inside of _getOrder will be first test the <em>type</em> for date, int, float etc. At the moment one could choose <em>different</em> <strong>_compare</strong>&#160;implementation where one will not make tests like <strong>toString.call(a) === &#39;[object Date]&#39; &#38;&#38; toString.call(b) === &#39;[object Date]&#39;</strong> for the column of the type "text" or "int". It should improve pervormance of local sorting.</p>
<p>To improve performance of local searching (filtering) one could use closures instead of strings (see inside of code fragments like <strong>&#39;jQuery.jgrid.getAccessor(this,\&#39;&#39;+f+&#39;\&#39;)&#39;</strong> inside of&#160;<strong>_compareValues</strong> for example). Usage of <strong>eval</strong> inside of <strong>execute</strong> method&#160;(see <a href="https://github.com/tonytomov/jqGrid/blob/v4.4.1/js/grid.base.js#L452" target="_blank">here</a>) make compilation of the code and execute it on the global context. The call of closures instead of <strong>eval</strong>&#160;could improve performance.</p>
]]></description>
        	        	<pubDate>Thu, 17 Jan 2013 12:19:23 +0200</pubDate>
        </item>
</channel>
</rss>