News Feed
Jobs Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Inviqa techPortal:
Speedy Sites Nginx and PHP
February 21, 2014 @ 11:55:17

On the Inviqa techPortal site today they have a new post from Barney Hanlon in his "Speedy Sites" series. This time he looks at using nginx to speed up your PHP applications.

In the previous article in this series, we looked at using Apache with mod_pagespeed to perform on-the-fly enhancements to decrease page load times. Getting an optimised page is only half the battle however; we need to ensure that our backend is doing as little work as possible in order to be highly scalable. In this article, we look at how we can achieve this while improving performance - all with nginx.

He starts with an introduction to nginx for those not familiar with this alternative web server and how it integrates with PHP. He walks you through the installations and configuration of a basic setup and running some benchmarks with siege. Finally, he shows how to enable PHP support on the install via the "php5-fpm" package (FastCGI).

0 comments voice your opinion now!
speed webserver nginx fastcgi fpm install configure tutorial

Link: http://techportal.inviqa.com/2014/02/20/speedy-sites-nginx-and-php/

HHVM.com:
Wow HHVM is fast...too bad it doesn't run my code
September 16, 2013 @ 10:54:01

On the HHVM.com blog, there's a post talking about the speed of the HipHop VM (from Facebook) but how it still doesn't support everything built into PHP (and the work being done to bring it up to parity).

HHVM is a highly performant PHP runtime. In fact, it is nearly 40% faster than HPHPc, and only getting faster. [...] Performance is critical, but it isn't everything. In order to gain broader adoption for HHVM, being able to run popular frameworks is a must; in other words, we can have the highest performing PHP runtime, but if doesn't run real-world code without a lot of pain, then it won't be used widely. Understanding this, we are putting serious resources around parity with the PHP runtime.

The post includes a table of features that have been ported and ones currently in the works, based on unit test coverage. They've based it on various well known PHP projects including PHPUnit, Symfony, Laravel, the Facebook SDK and many others. Their initial goal is to allow these frameworks to work 100% of the time inside the HHVM, but to continue the work from there, implementing other PHP features. If you'd like to help out with the process, they also welcome contributions.

0 comments voice your opinion now!
hhvm hiphip virtualmachine speed feature parity framework unittest

Link: http://www.hhvm.com/blog/?p=875

Greg Freeman:
Your PHP Framework Choice doesn't Matter
August 22, 2013 @ 11:45:18

In this new post Greg Freeman suggests something contrary to what most PHP developers (and framework supporters) believe - your choice of PHP frameworks doesn't matter...if you're basing it on speed.

I'm talking about the speed of PHP and more specifically, evaluating frameworks and tools based on "speed". If you have been in the PHP developer community for more than a few months, you would have seen at least a few discussions about what the fastest PHP framework is, as if this were one of the first key metrics you should evaluate first when choosing a framework for your team. You may even be contemplating switching from your current framework because you heard of a new framework that is faster. In the rest of this article, I'm going to do my best to show you why this not the best line of thinking and provide alternate and in my opinion better metrics for evaluating tools.

He talks about "frontend" versus "backend" PHP developers and how most PHP devs fit into the first category, not knowing how their applications really execute on the backend. This includes a pretty high-level concept of "speed." For his examples, he sets up a WordPress instance and fills it with some dummy content. He illustrates how, with a bit of tweaking on the "backend" side of things (server, environment, etc) the performance of the application can be greatly varied. He includes the specs for the environment he ran the tests in, some of the things he changed and a summary of the results.

0 comments voice your opinion now!
framework choice speed benchmark frontend backend environment

Link: http://www.gregfreeman.org/2013/your-php-framework-choice-doesnt-matter

Patrick Allaert:
Composer speeding up class autoloading
January 28, 2013 @ 12:22:43

In this new post Patrick Allaert offers a solution that can help speed up the inclusion of files via the Composer autoloader (in addition to the already present "optimize-autoloader" option).

The problem with the classmap strategy and the nature of PHP is that there is no (easy) way to have a persistent variable across requests containing the classmap. [...] This [large returned array of mappings] can even take a big portion of your request's response time when you have hundreds or thousands of classes like it is the case with eZ Publish 5 being based on Symfony, where about 2 600 classes are involved.

He suggests something that could be included into the Composer functionality itself - creating symbolic links in the PSR-0 standard to the location of the files to make it easier for Composer to resolve their location (based on namespace, not having to find them). Some sample code is included showing an additional autoloader that then uses the vendor names to match the path directly.

0 comments voice your opinion now!
composer symlinks autoload speed performance


Lorna Mitchell's Blog:
Proof that PHP 5.4 is Twice as Fast as PHP 5.3
June 14, 2012 @ 10:04:55

In this quick post to her blog, Lorna Mitchell shares an interesting bit of benchmarking she did between PHP versions 5.3 and 5.4, finding 5.4 twice as fast as it's previous version sibling.

So recently I was working on some benchmarks for different versions of PHP, because I heard that PHP 5.4 is "faster" and since I'm a data geek I want to know how much faster! Now, PHP 5.4 is, in general, faster than PHP 5.3 but not twice as fast* unless you pick a use case which has been particularly optimised. My first attempt at benchmarking the two versions produced this. This was a surprise to me; was PHP 5.4 really so much faster??

Her benchmark was a pretty simple one - looping and creating a new object, evaluating the timing of how long it took to execute. A commentor also points to some more official benchmarks that were done and posted to the php.internals mailing list.

0 comments voice your opinion now!
speed version difference improvement create object benchmark


Agile Toolkit Blog:
Which PHP Framework is the Fastest?
June 07, 2012 @ 12:47:41

The Agile Toolkit blog has a new post today that looks at speed in PHP frameworks the their relative speed (no, there's no benchmarks here).

This question is often asked, but is never answered properly. So how to measure framework speed? Let me also explain why "scalability" is more important than general "performance". [...] This along with a general overheads of the framework greatly contributes to the "slowness" of your project. So how can framework contribute to performance of your project?

They touch a few different ways that frameworks can help execute things a bit faster like:

  • Make Fewer SQL Queries
  • Selective render
  • Parallelization
  • Overheads
  • Caching
0 comments voice your opinion now!
framework speed performance tips rendering SQL overhead cache


Joseph Scott's Blog:
Slow Hashing
April 10, 2012 @ 11:55:02

In this new post Joseph Scott takes a look at hashing in PHP, specifically around md5 hashes, and a better alternative (that's also more secure.

The majority of the Coding Horror: Speed Hashing post talks about speed based on MD5. [...] If you are still using MD5 to hash passwords (or worse, aren't hashing passwords at all) then please stop and go use bcrypt. For those using PHP phpass is a great option.

He talks about the crypt method, how its encryption method and "cost" value effects the speed and how difficult it would be to generate all possible hashes for a password (hint: crypt with a cost of 13 is worlds better than md5).

0 comments voice your opinion now!
slow hashing md5 crypt blowfish cost speed


Joshua Thijssen's Blog:
Bloom Filters
April 09, 2012 @ 11:13:32

In this new post to his blog Joshua Thijssen describes something that can help when processing large amounts of data (like, in his example, the text of a book) to search through the information and find if a certain piece of data is in the set - a bloom filter.

Most of my co-workers never really heard of bloom filters, and I'm continuously need to explain what they are, what their purpose is and why it's a better solution than other ones. So let's do an introduction on bloom filters. [...] Bloom filters have the property of being exceptionally fast AND exceptionally small compared to other structures but it comes with a price: it MIGHT be possible that our bloom filter thinks that an element is inside our set, when it really isn't. Luckily, the reverse is not possible: when a bloom filter says something is NOT in the set, you are 100% sure that it isn't part of the set.

He explains how the filter works, noting how it's better for memory consumption and how it's possible for it to give a "maybe" response instead of ab absolute "yes" or "no". He also points out a PHP extension, bloomy that takes the hard work out of it for you.

0 comments voice your opinion now!
bloom filter search memory consumption speed


Volker Dusch's Blog:
Never trust other peoples benchmarks - A recent example (exceptions)
January 19, 2012 @ 09:20:32

In response to a previous post benchmarking exceptions, Volker Dusch has posted some of his own thoughts and benchmarking results on the same topic.

Some days ago there was a blog post regarding php exception performance in 5.4 and the numbers got reported all over the place. The actually numbers are secondary. The main point is: Don't trust "random" stuff on the Internet when thinking about improving your application performance. You always need to measure things for your self and take care doing so! I've initially trusted the benchmark myself and disgraced the whole post saying: "Well yes, exceptions are slower than if statements but nice that they got faster".

He includes some results with a bit more standardized testing - one run with both 5.3 and 5.4 using XDebug and another with it turned off for both. His results make sense, if you think about them:

So what we learn from that? Running stuff with debugging tools is slower than not doing that. That's why we don't use xDebug in production.
0 comments voice your opinion now!
benchmark rebuttal xdebug trust exception speed memory


DZone.com:
Speed Up Your PHP Like Facebook
November 29, 2011 @ 10:13:03

On DZone.com John Esposito reminds you about another technology Facebook has introduced to the world of PHP (besides HipHop) - XHProf, a PHP profiler.

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 look into it. Installation apparently requires a little nudging, but Nick Lewis just posted a full, practical guide 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.

There's also a link to some Drupal 6 benchmarks that shows how it has helped that project (including both small and large improvements).

0 comments voice your opinion now!
facebook hiphop xhprof profiler speed performance



Community Events











Don't see your event here?
Let us know!


facebook podcast install composer application example introduction framework security package symfony2 component release overview hack opinion language unittest hhvm code

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework