<?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: Filtering jsondata are slow -- eval </title>
	<link>http://www.trirand.com/blog/?page_id=393/discussion/filtering-jsondata-are-slow-eval</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/filtering-jsondata-are-slow-eval/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>minggi on Filtering jsondata are slow -- eval </title>
        	<link>http://www.trirand.com/blog/?page_id=393/discussion/filtering-jsondata-are-slow-eval#p29351</link>
        	<category>Discussion</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/discussion/filtering-jsondata-are-slow-eval#p29351</guid>
        	        	<description><![CDATA[</p>
<p>Hi</p>
<p>I have a filtering perfomance problem.</p>
<p>Now I fixed the problem with code below (replace the eval function):</p>
<p>Make this sense for you or have I&#160; an other problem with this code? It works much faster <img class="wp-smiley" src="/blog/wp-includes/images/smilies/icon_smile.gif" alt=":-)" /></p>
</p>
<p><input type='button' class='sfcodeselect' name='sfselectit5469' value='Select Code' data-codeid='sfcode5469' /></p>
<div class='sfcode' id='sfcode5469'>&#160;&#160; &#160;&#160;&#160;&#160; this.execute=function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var match=_query, results=[];<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(match === null){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;return self;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$.each(_data,function()<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;window.gridThis = this;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(new Function(&#34;return &#34; + match.replace(/this/g, &#34;window.gridThis&#34;) + &#34;;&#34;)())<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;{<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;results.push(this);<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;});<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;_data=results;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;return self;<br />&#160;&#160; &#160;&#160;&#160; &#160;};</div>
<p>Th original code was:</p>
<p><input type='button' class='sfcodeselect' name='sfselectit1939' value='Select Code' data-codeid='sfcode1939' /></p>
<div class='sfcode' id='sfcode1939'>&#160;&#160; &#160;&#160;&#160;&#160; this.execute=function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;var match=_query, results=[];<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(match === null){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;return self;<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;$.each(_data,function(){<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;if(eval(match)){results.push(this);}<br />&#160;&#160; &#160;&#160;&#160; &#160;&#160;&#160; &#160;});</div></p>
]]></description>
        	        	<pubDate>Tue, 20 Aug 2013 16:32:05 +0300</pubDate>
        </item>
</channel>
</rss>