<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP: Performance Improvement Tips</title>
	<atom:link href="http://blogs.digitss.com/php/php-performance-improvement-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.digitss.com/php/php-performance-improvement-tips/</link>
	<description>DiGiTSS Team&#039;s Programming experience with PHP, MySQL, Ajax, Javascript, jQuery, C# and Microsoft technologies</description>
	<lastBuildDate>Sun, 21 Aug 2011 16:15:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Bui Xuan Thanh</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-13692</link>
		<dc:creator>Bui Xuan Thanh</dc:creator>
		<pubDate>Tue, 24 May 2011 09:46:00 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-13692</guid>
		<description>For huge data, avoid using in_array function try to store the array by other ways and using isset() function   </description>
		<content:encoded><![CDATA[<p>For huge data, avoid using in_array function try to store the array by other ways and using isset() function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: HCkev</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-13590</link>
		<dc:creator>HCkev</dc:creator>
		<pubDate>Mon, 18 Apr 2011 07:24:39 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-13590</guid>
		<description>For the #10, it&#039;s totally false! 
 
It&#039;s even faster calling str_replace multiple times than using array if you have less than 5 replacements.  </description>
		<content:encoded><![CDATA[<p>For the #10, it&#039;s totally false! </p>
<p>It&#039;s even faster calling str_replace multiple times than using array if you have less than 5 replacements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: selo</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-12330</link>
		<dc:creator>selo</dc:creator>
		<pubDate>Wed, 01 Dec 2010 15:58:44 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-12330</guid>
		<description>only milliseconds. you are thinking very small. mind bigger in your head. 
 
milliseconds for a 500.000 request per day site is a good performance optimize. </description>
		<content:encoded><![CDATA[<p>only milliseconds. you are thinking very small. mind bigger in your head. </p>
<p>milliseconds for a 500.000 request per day site is a good performance optimize.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gavin Dibley</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-11891</link>
		<dc:creator>Gavin Dibley</dc:creator>
		<pubDate>Tue, 27 Apr 2010 17:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-11891</guid>
		<description>A few extra tips which will drastically help improve PHP scripts performance: 
1. If you only need to assign a value to a variable(s) once, make sure you place it outside for loops. 
 
2. When possible, only connect to each database once and reuse the connection throughout the running of the script (eg. by using a Factory pattern) 
 
3. avoid excess logic if, switch etc. if you can try to put logic code in the same if statement. 
 
Dont do 
if ($i == 1) { 
   // do stuff 
} 
else { 
  // do more stuff 
} 
 
if ($i == 1) { 
   // do even more stuff 
} 
 
Okay to do: 
if ($i == 1) { 
  //do stuff 
 // do even more stuff 
} 
else { 
  // do more stuff 
} 
 
4. Cache, cache, cache... if you expect the same data each time until a user does someone or admin changes it, then cache the content using something like memcache. 
 
5. be VERY careful with system calls as process intense commands may not only slow your script down, but possible the whole server, eg. imagemagick. </description>
		<content:encoded><![CDATA[<p>A few extra tips which will drastically help improve PHP scripts performance:</p>
<p>1. If you only need to assign a value to a variable(s) once, make sure you place it outside for loops.</p>
<p>2. When possible, only connect to each database once and reuse the connection throughout the running of the script (eg. by using a Factory pattern)</p>
<p>3. avoid excess logic if, switch etc. if you can try to put logic code in the same if statement.</p>
<p>Dont do</p>
<p>if ($i == 1) {</p>
<p>   // do stuff</p>
<p>}</p>
<p>else {</p>
<p>  // do more stuff</p>
<p>}</p>
<p>if ($i == 1) {</p>
<p>   // do even more stuff</p>
<p>}</p>
<p>Okay to do:</p>
<p>if ($i == 1) {</p>
<p>  //do stuff</p>
<p> // do even more stuff</p>
<p>}</p>
<p>else {</p>
<p>  // do more stuff</p>
<p>}</p>
<p>4. Cache, cache, cache&#8230; if you expect the same data each time until a user does someone or admin changes it, then cache the content using something like memcache.</p>
<p>5. be VERY careful with system calls as process intense commands may not only slow your script down, but possible the whole server, eg. imagemagick.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PHP : Performance Improvement Tips &#124; Jaric's Blog</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-10340</link>
		<dc:creator>PHP : Performance Improvement Tips &#124; Jaric's Blog</dc:creator>
		<pubDate>Sun, 05 Apr 2009 12:42:57 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-10340</guid>
		<description>[...] http://blogs.digitss.com/php/php-performance-improvement-tips/ code snifferPHP_CodeSniffer      Author: Jaric [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://blogs.digitss.com/php/php-performance-improvement-tips/">http://blogs.digitss.com/php/php-performance-improvement-tips/</a> code snifferPHP_CodeSniffer      Author: Jaric [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Writing better (performing) code..! What is that? : Blog Archive : blogs@DiGiTSS</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-4687</link>
		<dc:creator>Writing better (performing) code..! What is that? : Blog Archive : blogs@DiGiTSS</dc:creator>
		<pubDate>Sat, 25 Oct 2008 09:15:33 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-4687</guid>
		<description>[...] depends on the kind of project you are dealing with. Although his post has targeted my one of the PHP Performance Tips artical which was related to &quot;Writing better code with PHP... although some of them might not be [...]</description>
		<content:encoded><![CDATA[<p>[...] depends on the kind of project you are dealing with. Although his post has targeted my one of the PHP Performance Tips artical which was related to &#8220;Writing better code with PHP&#8230; although some of them might not be [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vance Lucas » Premature Performance Benchmarking is a Disease</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-4383</link>
		<dc:creator>Vance Lucas » Premature Performance Benchmarking is a Disease</dc:creator>
		<pubDate>Sat, 18 Oct 2008 19:46:42 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-4383</guid>
		<description>[...] articles are then followed up with other posts that only serve to perpetuate and solidify the original and invalid performance claims.  Articles [...]</description>
		<content:encoded><![CDATA[<p>[...] articles are then followed up with other posts that only serve to perpetuate and solidify the original and invalid performance claims.  Articles [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: CreatingDrew Weekly-Issue 1 &#124; CreatingDrew</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-4089</link>
		<dc:creator>CreatingDrew Weekly-Issue 1 &#124; CreatingDrew</dc:creator>
		<pubDate>Mon, 06 Oct 2008 05:51:59 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-4089</guid>
		<description>[...] Wednesday Oct 8, PHP Performance Tips [...]</description>
		<content:encoded><![CDATA[<p>[...] Wednesday Oct 8, PHP Performance Tips [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Added by a Pal to FAQPAl</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-4024</link>
		<dc:creator>Added by a Pal to FAQPAl</dc:creator>
		<pubDate>Sun, 05 Oct 2008 03:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-4024</guid>
		<description>&lt;strong&gt;PHP: Performance Improvement Tips...&lt;/strong&gt;

How to speed up your PHP code....</description>
		<content:encoded><![CDATA[<p><strong>PHP: Performance Improvement Tips&#8230;</strong></p>
<p>How to speed up your PHP code&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: [ kurt-network ] » Links</title>
		<link>http://blogs.digitss.com/php/php-performance-improvement-tips/comment-page-1/#comment-1996</link>
		<dc:creator>[ kurt-network ] » Links</dc:creator>
		<pubDate>Tue, 12 Aug 2008 00:08:11 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.digitss.com/?p=100#comment-1996</guid>
		<description>[...] 6. PHP: Performance Improvement Tips  [...]</description>
		<content:encoded><![CDATA[<p>[...] 6. PHP: Performance Improvement Tips  [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic page generated in 0.434 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2011-08-24 13:01:46 -->

