News Feed
Sections




News Archive
feed this:

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

Acquia Blog:
PHP is getting Faster
November 04, 2014 @ 13:35:29

On the Acquia blog they've posted another in their guest post series, this time from Richard Miller, a Senior Technical Consultant with SensioLabs (the people behind the Symfony framework). In this new post he talks about how the performance of PHP is getting better and why.

PHP is not the fastest language in which we could write web applications, yet we continue to do so for many other reasons. Pure speed of a language is rarely the main deciding factor for many projects. [...] So why worry about the speed of the language at all? Well, application architecture is improving and we are finding ways to avoid all those other bottlenecks. [...] Trying to gain speed through profiling and optimising code can be a long and tedious process. Thankfully, improvements in the speed of the language itself give us an improvement in these other areas for free.

He looks at "a brief history" of the language and the major milestones that have lead to the biggest performance gains over the years. He also talks about some of the alternatives out there to "normal PHP" for execution including the HHVM and HippyVM projects. He ends the post with a warning, though - be careful of fragmentation and separation of the community based on these different tools and embrace things like the language specification to keep things on an even keel.

0 comments voice your opinion now!
community acquia faster performance history runtime projects

Link: https://www.acquia.com/blog/php-getting-faster

Anna Filina:
Reduce number of queries
October 29, 2014 @ 10:53:10

In her most recent post Anna FIlina makes a recommendation to those looking to increase the performance of an application, especially one that's already in place: simply reduce the number of queries. It sounds simple enough, but can sometimes prove to be difficult depending on the application.

Customers often call me because their site is slow. One of the most common problems I found was a high number of queries that get executed for every single page hit. When I say a lot, I mean sometimes more than 1000 queries for a single page. This is often the case with a CMS which has been customized for the client's specific needs.

In this article, aimed at beginner to intermediate developers, I will explain how to figure out whether the number of queries might be a problem, how to count them, how to find spots to optimize and how to eliminate most of these queries. I will focus specifically on number of queries, otherwise I could write a whole tome. I'll provide code examples in PHP, but the advice applies to every language.

She suggests starting from "the top", looking at the browser's own information on which pieces of data are taking the longest to return back to the client (the latency). This gives a starting direction and tells you where to look for the worst offenders. She talks about a technique to locate and count the queries being made and some common issues found in multiple kinds of software (hint: loops). Then she gets down to the optimization - combining similar queries and better queries through joins.

0 comments voice your opinion now!
query database performance join similar tips

Link: http://afilina.com/reduce-number-of-queries/

Lorna Mitchell:
How to Choose PHP Hosting
October 10, 2014 @ 09:15:36

Lorna Mitchell has a new post today sharing some helpful hints to help you pick a good PHP hosting provider for your next application or website.

I've been thinking a lot about the state of hosting in PHP lately, mostly as a result of working with a few different clients on their setups (including one that bought brand new hosting a month ago and got a PHP 5.3.3 platform), and also being at DrupalCon and meeting a community who is about to make a big change to their minimum requirements. With that in mind, here are my thoughts and tips on choosing hosting.

She starts off with one of the bigger criteria she looks for in a host: the minimum PHP version available (some might have more than one, especially some PaaS). She suggests that even things like PHP 5.3 should be considered too old and should be passed over in favor of newer releases like 5.5 or even 5.6. She then talks about some of the benefits that come from using a newer platform and the current levels of adoption and performance by PHP version. Finally, she includes an unofficial list of hosts that have set themselves out as good, solid PHP-friendly providers, each with their own strengths and weaknesses.

0 comments voice your opinion now!
choose hosting provider paas dedicated version performance

Link: http://www.lornajane.net/posts/2014/how-to-choose-php-hosting

SitePoint PHP Blog:
PHP Dependency Injection Container Performance Benchmarks
August 11, 2014 @ 10:15:14

The SitePoint PHP blog has posted the results of some dependency injection container benchmarks they performed on several different DI libraries, some from a few of the major PHP frameworks.

Most frameworks and larger PHP applications utilize a Dependency Injection Container with the goal of a more maintainable codebase. However, this can have an impact on performance. As loading times matter, keeping sites fast is important as ever. Today I'm going to benchmark several PHP Dependency Injection containers to see what their relative performance is like.

The libraries in their list of those tested include PHP-DI, Zend/Di and the Aura.Di component. They compare each libraries against the others based on execution time, memory usage and the number of files required to make things work. The results of each test are shown in the graphs on the rest of the post. It's also broken up into a few different kinds of tests:

  • Test 1 - Create an instance of an object
  • Test 2 - Ignoring autoloading
  • Test 3 - Deep object graph
  • Test 4 - Fetching a Service from the container
  • Test 5 - Inject a service

The results are pretty consistent across all of the tests with certain libraries always performing better than others....but you'll have to read the post to find out those request. The scripts that were used to get the various results are also shared on GitHub if you'd like to take them for a spin on your own.

0 comments voice your opinion now!
dependency injection benchmark performance container

Link: http://www.sitepoint.com/php-dependency-injection-container-performance-benchmarks/

AboutPerformance Blog:
How to Spruce up your Evolved PHP Application - Part 2
August 08, 2014 @ 10:57:51

On the About:Performance site today there's a new post (part two in the series, part one is here) about increasing the performance in your PHP application. In this new post he talks about a few other updates that can be made to make your app fly.

In the first part of my blog I covered the data side of the tuning process on my homegrown PHP application Spelix: database issues, caching on both the server and the client. [...] In this part, I will concentrate more on technical topics: network traffic, code caching and session handling.

The post shares helpful tips and code examples showing how to:

  • Reduce Network Traffic
  • Leverage Browser / CDN cache
  • Use Conditional and Non-Conditional Caching
  • Using the HTML5 Application Cache
  • Optimize Session Handling

He does suggest the use of a commercial tool for a more in-depth analysis, but there's nothing here that it's required for. A little poking around in your browser can yield most of the same results.

0 comments voice your opinion now!
application performance tips traffic cdn cache session optimize

Link: http://apmblog.compuware.com/2014/08/06/spruce-evolved-php-application-part-2/

Symfony Blog:
Push it to the limits - Symfony2 for High Performance needs
August 04, 2014 @ 13:51:48

On the Symfony blog today they've posted a use case that talks about Symfony meeting some high performance needs and some of the development that was done to make it happen.

For most people, using full-stack frameworks equals slowing down websites. At Octivi, we think that it depends on correctly choosing the right tools for specific projects. When we were asked to optimize a website for one of our clients, we analyzed their setup from the ground up. The result: migrate them toward Service Oriented Architecture and extract their core-business system as a separate service. In this Case Study, we'll reveal some architecture details of 1 Billion Symfony2 Application. We'll show you the project big-picture then focus on features we really like in Symfony2. Don't worry; we'll also talk about the things that we don't really use.

They start with some of the business requirements they needed to meet and how it influenced the overall architecture of the application. They cover some of the things they liked the most about using the framework including bundles and using the EventDispatcher component. Some example code is also included for the custom handling they created for routing, CLI commands and request handling. There's also a mention of using the Profiler, Stopwatch and Monolog trio to do some performance analysis on the resulting application. Finally, there's a brief mention of some of the tools they're not using and why (two of them): Doctrine and Twig.

0 comments voice your opinion now!
symfony usecase performance need application custom

Link: http://symfony.com/blog/push-it-to-the-limits-symfony2-for-high-performance-needs

SitePoint WordPress Blog:
Speed Up Your WordPress Site
July 08, 2014 @ 10:08:34

Some advice has been posted over on the SitePoint WordPress blog with some tips for speeding up the performance of your WordPress site using both internal changes and some outside testing tools.

As one of the top user experience factors, website performance is more important than ever. Website speed and performance on mobile devices is particularly important, with a rapidly growing number of visitors accessing the web via smartphones and tablets. While WordPress is very easy to get up and running, making your site speedy requires a bit more work, and is an ongoing process. In this article we'll cover why speed matters, and offer some practical advice for how to speed up WordPress. Improving performance takes a lot of trial and error, but it's great fun!

They start the post with a few reasons why speed matters to your application and its users (including higher conversion rates). The show you how to run a basic speed test using the Google PageSpeed Insights and profiling the performance using the P3 (Plugin Performance Profiler). The post then gets into some of the factors that make an impact on your site's performance including the hosting provider configuration, choice of theme and number of plugins. They recommend some simple steps like minifying assets, caching or using CDNs to host the assets and make their load faster.

0 comments voice your opinion now!
wordpress speed performance tips

Link: http://www.sitepoint.com/speed-wordpress/

Master Zend Framework:
Using the ClassMap Autoloader for Better Performance
June 19, 2014 @ 11:18:29

Matthew Setter has a new post to his Master Zend Framework site today with a recommendation on how you can use a classmap in your autoloader to reduce the time it takes "searching" for the files it needs.

Zend Framework 2′s been critiqued many times as being slow, at least slower than some of the other leading PHP frameworks. And to be fair, sometimes it's true. But it doesn't need to be and there are simple things you can do to improve performance of your applications. So this post will be the first in a multi-part series looking at ways in which you can improve the performance of your Zend Framework 2 application, with only a minimum of effort. Today, we're looking at the 2 autoloaders which are available in Zend Framework 2; these being the StandardAutoloader and ClassMapAutoloader.

He briefly introduces the concept of autoloaders and the PSR-0 standard that helped to bring a more unified method for their handling. He then gets into examples of using each of the two autoloader types. The Standard version (a fallback if nothing else is set up) resolves things based on a file path and locating classes in the right namespaces. The ClassMap autoloader does this mapping ahead of time and matches a path to a namespace+class. He includes code snippets showing how to set each of them up and a few statistics (using Apache's ab tool) of the difference in performance.

0 comments voice your opinion now!
zendframework2 tutorial autoloader classmap standard performance

Link: http://www.masterzendframework.com/performance-2/classmap-autoloader

PHP.net:
PHP Next Generation
May 28, 2014 @ 09:14:05

On the main PHP.net site today there's an announcement posted about the working being done on the next generation of the PHP language based on some recent discussions (and actual development work). The PHPNG branch helps boost the performance of the language to new levels and cleans up some of the core APIs.

When we aren't looking for pictures of kittens on the internet, internals developers are nearly always looking for ways to improve PHP, a few developers have a focus on performance. Over the last year, some research into the possibility of introducing JIT compilation capabilities to PHP has been conducted. During this research, the realization was made that in order to achieve optimal performance from PHP, some internal API's should be changed. This necessitated the birth of the phpng branch, initially authored by Dmitry Stogov, Xinchen Hui, and Nikita Popov.

The post talks about the performance increase of these changes (an average of 20%) and the current progress made on the internal project. This is "only the start" of the work on this new functionality, so keep an eye on the PHP.net site for more upcoming details.

0 comments voice your opinion now!
phpng next generation branch project performance

Link: http://www.php.net/archive/2014.php#id2014-05-27-1

SitePoint PHP Blog:
PHP Fights HHVM and Zephir with PHPNG
May 27, 2014 @ 10:14:23

In a new post to the SitePoint PHP blog Bruno Skvorc talks about a "fight" that has broken out between various technologies vying to come out as the top PHP performance platform...more specifically the recent PHPNG patch to the PHP language itself.

Chaos in the old world! First HipHop, years ago, and no one bats an eye. Then suddenly, HHVM happens, introduces Hack, and all hell breaks loose - Facebook made a new PHP and broke/fixed everything (depending on who you ask). Furthermore, Zephir spawns and threatens with C-level compilation of all your PHP code, with full support for current PHP extensions. It's mushroom growth time for alternative PHP runtimes, and HippyVM appears as well. Amid the sea of changes, another splash was heard: PHPNG.

He covers some of the basics of the PHPNG patch, who has been working on it and some of the main pros and cons about the refactor. While it does provide a speed boost and native extension support, not all extensions are supported and the internal developers are divided on its adoption.

0 comments voice your opinion now!
hhvm zephir performance phpng introduction

Link: http://www.sitepoint.com/php-fights-hhvm-zephir-phpng/


Community Events





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


security release language library podcast framework interview community laravel introduction symfony conference version tool series voicesoftheelephpant package composer list opinion

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