<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Tue, 21 May 2013 06:39:03 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Zumba Engineering Blog: Some CakePHP optimizations]]></title>
      <guid>http://www.phpdeveloper.org/news/18708</guid>
      <link>http://www.phpdeveloper.org/news/18708</link>
      <description><![CDATA[<p>
For those out there using the CakePHP framework to create your applications, you might be interested in <a href="http://engineering.zumba.com/2012/11/05/cakephp-optimizations/">these quick tips</a> from <i>Juan Basso</i> on the Zumba Engineering Blog for both the architecture and actual code to optimize the performance of the app.
</p>
<blockquote>
Our site and system has a lot of throughput and it make us use more instances and try to reduce the load in every part. It makes the company happy (save money) and also make the customer happy (faster load). On this article I will go over few things in terms of architecture and some code changes/strategies that could make your application faster as well.
</blockquote>
<p>Some of the recommendations include:</p>
<ul>
<li>Installing the APC/opcode caching to help save execution time
<li>Avoiding as many network requests as possible
<li>Use local file/data caching
<li>Using the "requestAction" inside controllers with its built-in caching
</ul>]]></description>
      <pubDate>Wed, 07 Nov 2012 09:31:20 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Speeding Up Your CakePHP Websites]]></title>
      <guid>http://www.phpdeveloper.org/news/18575</guid>
      <link>http://www.phpdeveloper.org/news/18575</link>
      <description><![CDATA[<p>
PHPMaster.com has a new tutorial posted sharing a few helpful hints about <a href="http://phpmaster.com/speeding-up-your-cakephp-websites/">speeding up CakePHP-driven sites</a> to help squeeze the most performance out of your site.
</p>
<blockquote>
By applying a few simple modifications, and even some more complex enhancements, CakePHP can be sped up quite a bit. By the time you work your way through even half of these changes, the performance of your your CakePHP site will be comparable to many other popular PHP frameworks, with the advantage that your development speed will never falter!
</blockquote>
<p>
There's several tips in their list - some a bit more difficult to accomplish than others, but worth the results:
</p>
<ul>
<li>Upgrade CakePHP Versions
<li>Disable Debug Mode
<li>Disable Recursive Find Statements
<li>Cache Query Results
<li>Install Memory Based Caching
<li>Removing Apache and Installing Nginx
<li>Configure Nginx to use Memcached
<li>Remove MySQL and Install Percona
</ul>
<p>
For more information on the CakePHP framework, see the <a href="http://cakephp.org">project's main site</a>.
</p>]]></description>
      <pubDate>Tue, 09 Oct 2012 10:08:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: The Need for Speed: Profiling with XHProf and XHGui]]></title>
      <guid>http://www.phpdeveloper.org/news/18435</guid>
      <link>http://www.phpdeveloper.org/news/18435</link>
      <description><![CDATA[<p>
On PHPMaster.com today <i>Matt Turland</i> has an article posted about <a href="http://phpmaster.com/the-need-for-speed-profiling-with-xhprof-and-xhgui/">using XHProf and XHGui</a> to find the performance issues in your application and profile them to help optimize things.
</p>
<blockquote>
Profiling is the process of measuring the execution time of each function or method call involved in servicing a single page request. The data collected from this process can reveal issues such as a particular method taking a long time to execute or being called a large number of times. Profiling a PHP script generally requires installing a PHP extension. The two more popular extensions for this purpose are <a href="http://derickrethans.nl/">Derick Rethans</a>' <a href="http://pecl.php.net/package/xdebug">Xdebug</a> and Facebook's <a href="http://pecl.php.net/package/xhprof">XHProf</a>. This article will focus on XHProf.
</blockquote>
<p>
He walks you through the installation of both and shows you some sample results of the profiling of a simple application and how you can compare the results across profiling runs. Additionally, if you install <a href="http://www.graphviz.org/">graphviz</a> support, you can <a href="http://cdn.phpmaster.com/files/2012/09/xhprof-03.png">generate the call stack output</a> in a visual form to make for easier consumption.
</p>]]></description>
      <pubDate>Mon, 03 Sep 2012 10:29:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anson Cheung's Blog: Optimize Web Site Performance by using YSlow]]></title>
      <guid>http://www.phpdeveloper.org/news/16940</guid>
      <link>http://www.phpdeveloper.org/news/16940</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Anson Cheung</i> guides you through another tool that can help you optimize your web applications - <a href="http://www.ansoncheung.tk/articles/optimize-web-site-performance-using-yslow">using YSlow for the frontend</a> to detect trouble spots early (whether they're actually caused by the frontend or not).
</p>
<p>
He goes through the thirteen rules to help improve your website's performance including:
</p>
<ul>
<li>Make fewer HTTP requests
<li>Gzip components
<li>Make JS and CSS external
<li>Remove duplicate scripts
<li>Configure ETags
</ul>
<p>
For more information about the YSlow extension (available for Firefox, Chrome, Opera and mobile devices), check out the <a href="http://developer.yahoo.com/yslow/">project's page</a> on Yahoo's Developer section (including ten more rules it checks).
</p>]]></description>
      <pubDate>Mon, 03 Oct 2011 11:12:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara's Blog: On Optimization in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16698</guid>
      <link>http://www.phpdeveloper.org/news/16698</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has a new post to his blog today looking at something that's constantly a focus of user-facing applications, PHP ones or otherwise - <a href="http://blog.ircmaxell.com/2011/08/on-optimization-in-php.html?m=0">application optimization</a>. He specifically discusses handling it in PHP and some things to keep an eye out for.
</p>
<blockquote>
When it comes to optimization, there are two competing viewpoints in the PHP community. Some say that optimization should only ever be an after thought and to avoid premature optimization at all costs. Others will say that this is impractical, and you should make your application fast as you write it, since then you won't have to go back and clean it up to make it faster. While I can understand the viewpoints of both sides, I am firmly in the former category.
</blockquote>
<p>
He talks about the "90/10 Rule" of development (most of the work is done by only a small part of the code) and what that critical 10% could be made of. He also touches on the "60/40 Rule", "instinctual optimization" and the emphasis people put on benchmarks for their tool or framework of choice.
</p>]]></description>
      <pubDate>Wed, 10 Aug 2011 08:35:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Justin Carmony's Blog: Working with Middle-Scale Websites]]></title>
      <guid>http://www.phpdeveloper.org/news/16618</guid>
      <link>http://www.phpdeveloper.org/news/16618</link>
      <description><![CDATA[<p>
In a new post <i>Justin Carmony</i> looks at what it <a href="http://www.justincarmony.com/blog/2011/07/18/working-with-middle-scale-websites/">means to me a "middle-scale website"</a> and has some recommendations for anyone working with their applications and considering things like scalability, overcompensation and finding real results through profiling.
</p>
<blockquote>
Hopefully at some point, your website is going to get a lot of traffic. Yay, you've reached your goal of getting good traffic, but it is soon followed by issues with performance and load. I like to call these the growing pains of a website. So as a web developer, I suddenly have the epiphany of "Hey, I need to scale my website!" What follows next is the biggest mistake a web developer can make: They start looking at articles on how Google scales, or maybe how Facebook manages all of their traffic. This is a mistake! To be brutally honest, you are not Google. You are not Facebook. You are not Twitter. You are a website that receives less than 0.000001% of the traffic that some of the major websites receive.
</blockquote>
<p>
He includes a "reality check" of the setup behind a popular social site, <a href="http://stackexchange.com/">StackExchange</a>, with comments from their <a href="http://blog.serverfault.com/post/stack-exchanges-architecture-in-bullet-points/">own post about their infrastructure</a>. He talks about things included in a move to "middle-scale" like adding caching, performance tweaking, moving to a multiple server model and using replication.
</p>]]></description>
      <pubDate>Thu, 21 Jul 2011 11:53:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Fabien Potencier's Blog: The PHP Ternary Operator: Fast or not?]]></title>
      <guid>http://www.phpdeveloper.org/news/16601</guid>
      <link>http://www.phpdeveloper.org/news/16601</link>
      <description><![CDATA[<p>
In a new post <i>Fabien Potencier</i> looks at <a href="http://fabien.potencier.org/article/48/the-php-ternary-operator-fast-or-not">the ternary operator</a> in PHP and wonders which is faster - using it or not (well, sort of...)
</p>
<blockquote>
People like micro-optimizations. They are easy to understand, easy to apply... and useless. But some time ago, while reviewing pull requests for <a href="http://twig-project.org/">Twig</a>, I read an interesting discussion about the performance of the <a href="https://github.com/fabpot/Twig/issues/380">ternary operator</a> in PHP (thanks to <a href="https://github.com/nikic">@nikic</a> for the investigation). Do you know which [example] snippet is the fastest (of course, they do exactly the same)? The right answer is: it depends.
</blockquote>
<p>
He notes that it's all about the data being worked with. As some of his tests show (testing code included) there does end up being a difference between using it on a small and large dataset. After investigation, it was found that the ternary operator copies (copy-on-write) the value versus an "if" that just evaluates. He also mentions the new "?" version of the ternary syntax in PHP 5.3, but notes it still suffers from the same issue.
</p>
]]></description>
      <pubDate>Mon, 18 Jul 2011 10:35:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Optimize File Downloading in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16562</guid>
      <link>http://www.phpdeveloper.org/news/16562</link>
      <description><![CDATA[<p>
New on DevShed.com today is a tutorial helping you <a href="http://www.devshed.com/c/a/PHP/Optimize-File-Downloading-in-PHP/">optimize your file downloading</a> for your web application and provide a way to give users dynamic links to files instead of direct ones.
</p>
<blockquote>
The true path to the downloadable content can be revealed easily and is not protected, allowing users to bypass web forms and download the content directly using a browser. [...] The Solution: A Secure and Efficient PHP Download Script
</blockquote>
<p>
<a href="http://www.devshed.com/c/a/PHP/Optimize-File-Downloading-in-PHP/">This tutorial</a> is actually an update of <a href="http://www.devshed.com/c/a/PHP/Simple-and-Secure-PHP-Download-Script-with-Limits-Tutorial/">their previous tutorial</a> looking at a similar subject, with a few differences. Their code provides a way to limit the files a user can download, the number of times they can download it and a script to read the file and push it to the user without them ever knowing the path.
</p>]]></description>
      <pubDate>Thu, 07 Jul 2011 11:05:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matt Knight's Blog: Optimising Zend_Config]]></title>
      <guid>http://www.phpdeveloper.org/news/16557</guid>
      <link>http://www.phpdeveloper.org/news/16557</link>
      <description><![CDATA[<p>
<i>Matt Knight</i> has a recent post looking at a specific part of the Zend Framework, the Zend_Config component, and how it's overhead can be reduced (and somewhat replaced) <a href="http://www.matt-knight.co.uk/2011/optimising-zend-config/">using a few lines of PHP 5.3-specific code</a>.
</p>
<blockquote>
One such limitation that I've recently seen is the performance of Zend_Config. This class underpins the mechanism by which developers provide configuration to the application, and all this config is passed around in the form of Zend_Config objects. [...] For the purposes of this article, I'm referring specifically to config INI files, using Zend_Config_Ini to parse. This is a very common format for Zend applications to use - it is familiar to developers and infrastructure support teams - and is the case where the performance issues become apparent
</blockquote>
<p>
He talks about parsing ini files and the complications that can come with the Zend Framework method of parsing them - conversion to objects via a recursive method, merging data from different sections and the overhead toArray can cause. He shows an alternative that uses <a href="http://php.net/array_replace_recursive">array_replace_recursive</a> to handle the parsing and a class version that offers backwards compatibility with the Zend_Config structure. He claims to have seen a sixty percent jump in performance using these methods over the Zend Framework's defaults.
</p>]]></description>
      <pubDate>Wed, 06 Jul 2011 10:39:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Phil Sturgeon's Blog: Benchmark 2011: A call for Participants]]></title>
      <guid>http://www.phpdeveloper.org/news/16282</guid>
      <link>http://www.phpdeveloper.org/news/16282</link>
      <description><![CDATA[<p>
<i>Phil Sturgeon</i> has <a href="http://philsturgeon.co.uk/blog/2011/05/benchmark-2011-a-call-for-participants">put out a call for volunteers</a> about running some benchmarks on the wide range of PHP frameworks out there. He wants set up a "Benchamrks 2011" event that gives all of the frameworks their fair share at putting up good numbers in their most optimized fashion.
</p>
<blockquote>
Yesterday Dan Horrigan (another PHP framework user and developer) suggested we all have a go at "Benchmark 2011". A chance for every framework developer or interested party to take their framework of choice, make a hello world and post it up online for a fair and factual survey of how many requests per second the base of the framework can handle without APC, etc. [...] This is not a new idea and it is certianly not meant to be an all encompasing comparison of framework features. The logic here is the same as testing the speed of server software such as Apache vrs Nginx.
</blockquote>
<p>
He's included some rules to follow in creating your examples including the use of the latest release of the frameworks, no modification to the core framework files is allowed and you must create a publicly accessible repository with the example's files. If you're interested in participating, you can create your example and <a href="http://twitter.com">tweet</a> about it with the "#benchmark2011" hashtag or just <a href="http://philsturgeon.co.uk/blog/2011/05/benchmark-2011-a-call-for-participants">post about it in the comments</a>.
</p>]]></description>
      <pubDate>Mon, 02 May 2011 12:08:52 -0500</pubDate>
    </item>
  </channel>
</rss>
