<?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>Sun, 12 Feb 2012 20:27:28 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Leaseweb Labs Blog: Migration to Symfony2 continued]]></title>
      <guid>http://www.phpdeveloper.org/news/17525</guid>
      <link>http://www.phpdeveloper.org/news/17525</link>
      <description><![CDATA[<p>
On the LeaseWeb Labs blog there's a continuation from a previous post about migrating your Symfony1 application over to Symfony2. In the <a href="http://phpdeveloper.org/news/17299">first part</a> of this series of posts, <i>Stefan Koopmanschap</i> talked about wrapping your code to make it work. In <a href="http://www.leaseweblabs.com/2012/02/migration-to-symfony2-continued/">this second post</a>, <i>Maurtis van der Schee</i> tackles two issues <i>Stefan</i> mentioned - performance problems and handling authorization/authentication.
</p>
<blockquote>
On December 21, 2011 Stefan Koopmanschap wrote an excellent article on this blog titled "Painless (well, less painful) migration to Symfony2." [...] We were very much inspired by his passionate elucidation and we were fully convinced of the urge to start migrating to Symfony2 as soon as possible. However, he also provided us with a "A word of caution" about 2 things: performance and authentication/authorization. This might get some people worried, but not us: it challenged us to find a solution for those two open issues.
</blockquote>
<p>
They explain why these two things are a problem and some of their solutions they've created - a .htaccess for routing and manually replicating the Symfony2 session in the Symfony1 code. Included in the post are the rewrite rules and code to make these two things happen (and a small configuration change to make them work).
</p>]]></description>
      <pubDate>Thu, 09 Feb 2012 11:51:59 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Kurt Payne's Blog: User register_tick_function to profile your code]]></title>
      <guid>http://www.phpdeveloper.org/news/17512</guid>
      <link>http://www.phpdeveloper.org/news/17512</link>
      <description><![CDATA[<p>
<i>Kurt Payne</i> has a new post to his blog showing how to <a href="http://kpayne.me/2012/02/04/use-register_tick_function-to-profile-your-code/">use register_tick_function</a> with a callback to help benchmark and profile your application to find its pain spots.
</p>
<blockquote>
A profiler gives you the ability to trace the performance of your code through every function call and create an overview of your system's performance over a certain time period and helps you make intelligent decisions about where to look for problems. [...] But what if you're in an environment where you can't install [the xdebug or xhprof] extension? Luckily, php has a built-in function called <a href="http://php.net/register_tick_function">register_tick_function</a> that gives you a way to hook in to every user function that's called.  With this, you can write a profiler yourself.
</blockquote>
<p>
A bit of sample code illustrates his method - it defines a "do_profile" function and assigns it with the <a href="http://php.net/register_tick_function">register_tick_function</a> call. This function generates a debug backtrace and echos out the function path it took to get to that spot (output is included). He provides code for a bit more useful profiling and points out that it could easily be graphed to help visualize the problems. Also included are a few caveats to watch out for when using this method of profiling.
</p>]]></description>
      <pubDate>Tue, 07 Feb 2012 13:26:23 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ulf Wendel's Blog: PHP mysqlnd query cache plugin quickstart is online!]]></title>
      <guid>http://www.phpdeveloper.org/news/17413</guid>
      <link>http://www.phpdeveloper.org/news/17413</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Ulf Wendel</i> has pointed out that the <a href="http://blog.ulf-wendel.de/2012/php-mysqlnd-query-cache-plugin-quickstart-is-online/">mysqlnd query cache plugin quickstart is posted</a> on the <a href="http://docs.php.net/manual/en/mysqlnd-qc.quickstart.php">docs.php.net</a> site.
</p>
<blockquote>
New in the PHP manual: a <a href="http://docs.php.net/manual/en/mysqlnd-qc.quickstart.php">quickstart for the mysqlnd query cache plugin</a>. PECL/mysqlnd_qc, the mysqlnd query cache plugin, is transparent and ease to use. But, how? Some pointers have been given in assorted <A href="http://blog.ulf-wendel.de/2012/php-mysqlnd-query-cache-plugin-quickstart-is-online/www.slideshare.net/nixnutz/">presentations</a>, here on my blog and in some, few examples from the manual. Fixed. You can now browse a quickstart to gain a quick overview.
</blockquote>
<p>
The <a href="http://pecl.php.net/package/mysqlnd_qc">query cache plugin</a> can replace the query caching MySQL does and can help with things like multiple storage options (memory, APC, Memcache, etc) and almost no changes to your application. There's also a method (mysqlnd_qc_get_query_trace_log) that comes with the plugin that gives you a "stack trace" of every query run through the MySQL interface. 
</p>]]></description>
      <pubDate>Wed, 18 Jan 2012 12:12:21 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Checking the performance of PHP exceptions]]></title>
      <guid>http://www.phpdeveloper.org/news/17403</guid>
      <link>http://www.phpdeveloper.org/news/17403</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post to his blog today looking at <a href="http://gonzalo123.wordpress.com/2012/01/16/checking-the-performance-of-php-exceptions/">the performance of PHP exceptions</a> and how it could effect your application's overall speed.
</p>
<blockquote>
Sometimes we use exceptions to manage the flow of our scripts. I imagine that the use of exceptions must have a performance lack. Because of that I will perform a small benchmark to test the performance of one simple script throwing exceptions and without them.
</blockquote>
<p>
His (little) benchmarking scripts are included - both looping 100000 times, one throwing an exception and the other not. The results were pretty obvious - the memory usage was about the same but the speed was about ten times faster without the exceptions (in PHP 5.3). In PHP 5.4, however, the numbers were closer as far as time to run. Obviously, unless you make super heavy use of exceptions, you're not even going to come close to something like this (micro-optimization anyone?).
</p>]]></description>
      <pubDate>Tue, 17 Jan 2012 08:02:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: PHP's Quest for Performance: From C to hhvm]]></title>
      <guid>http://www.phpdeveloper.org/news/17280</guid>
      <link>http://www.phpdeveloper.org/news/17280</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new post from <i>Matthew Turland</i> talking about PHP's <a href="http://phpmaster.com/phps-quest-for-performance/">quest for performance</a> and some of the recent advancements that have made better performing applications even more possible.
</p>
<blockquote>
While it's sufficient for many users, as PHP sees increased use by large sites like Wikipedia and Facebook, the ability to serve more requests on fewer servers becomes increasingly important. Some efforts have been made in this area in the last few years, both within and outside the PHP internals team. However, understanding exactly what's going on requires a bit of background both in history and concepts.
</blockquote>
<p>
He goes through some of the origins of the PHP language (from the early days with <i>Rasmus Lerdorf</i>) to the fact that the PHP language itself is interpreted - complete with some of the overhead that comes with that. He also mentions various projects that have tried to compile PHP back down to C to increase performance like <a href="http://www.roadsend.com/home/index.php">Roadsend</a>, <a href="https://www.facebook.com/note.php?note_id=280583813919">HipHop</a> and, most recently, the <a href="https://www.facebook.com/notes/facebook-engineering/the-hiphop-virtual-machine/10150415177928920">HipHop virtual machine</a> from Facebook.
</p>]]></description>
      <pubDate>Tue, 20 Dec 2011 08:40:58 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Speed Up Your PHP Like Facebook]]></title>
      <guid>http://www.phpdeveloper.org/news/17182</guid>
      <link>http://www.phpdeveloper.org/news/17182</link>
      <description><![CDATA[<p>
On DZone.com <i>John Esposito</i> <a href="http://css.dzone.com/articles/speed-your-php-facebook">reminds you</a> about another technology Facebook has introduced to the world of PHP (besides HipHop) - <a href="https://github.com/facebook/xhprof">XHProf</a>, a PHP profiler.
</p>
<blockquote>
Facebook did more for PHP: they also created XHProf, a PHP profiler with a (supposedly) easy-to-use HTML interface, designed to pinpoint exactly where your bottlenecks are appearing, so that you can optimize at every stage in the pipeline. [...] If you haven't tried XHProf, you might want to <a href="https://github.com/facebook/xhprof">look into it</a>. Installation apparently requires a little nudging, but Nick Lewis just posted a <a href="http://nicklewis.org/node/1087">full, practical guide</a> to benchmarking and performance tuning your PHP and MySQL, using XHProf (as well as other techniques) -- a very nice overview of many common bottlenecks and how to open them up.
</blockquote>
<p>
There's also a link to some <a href="http://groups.drupal.org/node/187209">Drupal 6 benchmarks</a> that shows how it has helped that project (including both small and large improvements).
</p>]]></description>
      <pubDate>Tue, 29 Nov 2011 10:13:03 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Johannes Schl&uuml;ter's Blog: High Performance PHP Session Storage on Scale]]></title>
      <guid>http://www.phpdeveloper.org/news/17147</guid>
      <link>http://www.phpdeveloper.org/news/17147</link>
      <description><![CDATA[<p>
In <a href="http://schlueters.de/blog/archives/164-High-Performance-PHP-Session-Storage-on-Scale.html">this new post</a> to his blog, <i>Johannes Schl&uuml;ter</i> looks at a high-performance solution to the usual storing PHP session information via a memcache frontend with a MySQL Cluster backend.
</p>
<blockquote>
Unfortunately even such a system [using MySQL and InnoDB tables] has limits and unfortunately replication is no good solution here to scale further as we will always need a master for writing the updated session data. By using replication we can take some load from it and we can configure a slave which can be promoted to master to keep session alive if the primary master machine fails but at some point in time we need another solution ... but, happy news, again: One doesn't have to look far as MySQL cluster will be happy to help. MySQL Cluster "is a high-availability, high-redundancy version of MySQL adapted for the distributed computing environment," as the <a href="http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster.html">MySQL documentation states</a>. 
</blockquote>
<p>
He describes the setup (after pointing to <a href="http://www.clusterdb.com/mysql-cluster/scalabale-persistent-ha-nosql-memcache-storage-using-mysql-cluster/">this post</a> about installing MySQL Cluster for memcache) and includes some sample code/SQL/ini settings you'll need to use to get PHP's <a href="http://us.php.net/manual/en/class.memcached.php">memcached</a> functionality to cooperate with it.
</p>
]]></description>
      <pubDate>Fri, 18 Nov 2011 10:13:25 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Learncomputer.com: PHP Profilers Compared (PHP Quick Profiler & XDebug)]]></title>
      <guid>http://www.phpdeveloper.org/news/17125</guid>
      <link>http://www.phpdeveloper.org/news/17125</link>
      <description><![CDATA[<p>
In a recent post from Learncomputer.com, there's a <a href="http://www.learncomputer.com/php-profilers/">comparison of two PHP profilers</a> - the <a href="http://particletree.com/features/php-quick-profiler/">PHP Quick Profiler</a> and the one included in <a href="http://xdebug.org/docs/profiler">Xdebug</a>.
</p>
<blockquote>
Whether you are an experienced developer or just getting started it is important to know how to measure the performance of your scripts and applications so that you can learn to make improvements and optimizations to your code. [...] This article compares two of the most popular [profiling] solutions under free license that you can begin using today to profile your PHP applications.
</blockquote>
<p>
They describe each of the tools - the Quick PHP Profiler acting more like a plugin (running on each page load) and Xdebug working more behind the scenes and providing cachegrind files. These files can be viewed in cachegrind tools to drill in to the badly performing aspects of your applications and find the issues.
</p>
<blockquote>
If you need a free tool it can be difficult to find a PHP profiling tool that has all of the features you may want and the interface that you like all rolled into one. Identifying what kind of data you are looking for and what information you need from a profiling tool will allow you to choose the best solution for your needs.
</blockquote>]]></description>
      <pubDate>Mon, 14 Nov 2011 11:53:31 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Swan's Blog: Why is PHP 5.3 on Windows faster than previous PHP versions?]]></title>
      <guid>http://www.phpdeveloper.org/news/16987</guid>
      <link>http://www.phpdeveloper.org/news/16987</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Brian Swan</i> explains why the latest versions of PHP (the 5.3.x series) are <a href="http://blogs.msdn.com/b/brian_swan/archive/2011/10/12/why-is-php-5-3-on-windows-faster-than-previous-php-versions.aspx">faster now on Windows</a> than some previous versions have been. (Hint: updated technology can work wonders sometimes)
</p>
<blockquote>
[Rasmus Lerdorf recently said at a <a href="http://www.meetup.com/php-49/">Seattle meetup</a>] "If you aren't running PHP 5.3 on Windows, you're lucky…because you have a 40% performance boost coming." He clarified this by saying that, with some help from Microsoft, improvements were made in PHP 5.3 that led to a 40% performance improvement of PHP on Windows. Because he didn't go into the details of why this performance boost was realized, I got questions in email the next day asking about why.
</blockquote>
<p>
The information in a <a href="http://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-33-78-metablogapi/8802.image_5F00_511FB339.png">borrowed slide</a> (from a presentation by <a href="http://twitter.com/#!/pierrejoye">Pierre Joye</a>) shows what the differences between the versions are - things like the use of a more modern compiler (VC9 vs VC6), calls to the Win32 API directly and better library management.
</p>]]></description>
      <pubDate>Thu, 13 Oct 2011 08:42:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Andrew Martin's Blog: Serving PHP session files from a RAM based disk (tmpfs) for AWS Micro Instance]]></title>
      <guid>http://www.phpdeveloper.org/news/16959</guid>
      <link>http://www.phpdeveloper.org/news/16959</link>
      <description><![CDATA[<p>
<i>Andrew Martin</i> has a new post to his blog looking at a technique that could be used to help minimize some of the performance issues you could see on <a href="http://aws.amazon.com">AWS micro instances</a> dealing with PHP session handling. His alternative is <a href="http://www.binarysludge.com/2011/08/31/serving-php-session-files-from-a-ram-based-disk-tmpfs-for-aws-micro-instances/">serving them from a RAM-based disk</a> instead.
</p>
<blockquote>
It's rare to find a web server with slow disk I/O performance, but Amazon's EC2 micro-instances are one such example. Their EBS disk subsystem access is rated "low", and this can have a detrimental effect on HTTP throughput. [...] This leaves sessions, which can be written to a <a href="http://www.binarysludge.com/2011/01/13/redundant-and-fault-tolerant-php-session-storage/">redundant and fault tolerant storage system</a>. [...] In order to speed up the disk access, a RAM-based disk can be mounted over the session directory. This has the disadvantage of being volatile - the data is lost in case of a server reboot, or the mount point being unmounted. However if tolerable, storing sessions in RAM insulates the application from poor filesystem performance.
</blockquote>
<p>
He mentions the two types of kernels that can be used, ramfs and tmpfs, and the specifics of using a tmpfs filesystem to implement the technique (complete with command line calls to make it happen). 
</p>]]></description>
      <pubDate>Thu, 06 Oct 2011 11:42:36 -0500</pubDate>
    </item>
  </channel>
</rss>

