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

Kévin Dunglas:
Using PSR-7 in Symfony
June 24, 2015 @ 12:50:56

With the recent acceptance of the PSR-7 HTTP standard by the PHP-FIG, there's been a lot of articles about using it in various PHP frameworks. In this new post Kevin Douglas looks at the use of it in Symfony, how it relates to the HttpFoundation component and when it will be included in the framework itself.

Back in 2011, Symfony 2 introduced the HttpFoundation component, a PHP library representing HTTP messages with an object oriented API. HttpFoundation is a key in the success of the HTTP-centric approach of Symfony, and it definitely inspirited the PSR-7 specification. However, PSR-7 and HttpFoundation differ fundamentally in two aspects: PSR-7 messages are immutable, mutability is in the DNA of HttpFoundation and in PSR-7, almost everything is stream.

Because of immutability it is very hard to make HttpFoundation embracing PSR-7 without a huge backward compatibility break impacting thousands of existing applications and bundles.

Work was almost immediately started to support the PSR-7 specification in Symfony, however. As a result support will be ready to be included in Symfony 2.7 but, as the rest of the post shows, it can be introduced in versions 2.3 or greater through a "HTTP message bridge" library. He shows how to get this installed in your Symfony application instance and how to use it in your controllers to interact with Requests and Responses. He does point out, though, that while this can bring your release up to PSR-7 status it comes with some overhead that may not be worth it if you're concerned about performance.

0 comments voice your opinion now!
psr7 symfony bridge httpfoundation performance library

Link: http://dunglas.fr/2015/06/using-psr-7-in-symfony/

Loïc Chardonne:
Symfony Differently - part 1 Introduction
June 12, 2015 @ 08:48:26

Loïc Chardonne has kicked off a new series of posts on his site that talk about doing "Symfony Differently" and some things to consider/change to increase your Symfony application's performance.

Symfony is an amazing HTTP framework which powers high traffic websites. Performance shouldn't be a concern when first creating a website, because between the time it is launched and the time it actually has a high traffic many things that we didn't expect in the first days will happen: requirements will change, user behavior will change, even the team can change.

Optimizing applications has an impact over maintenance, and making it harder to change right from the beginning might not be the best option. However when the need of performance actually arises, we need to tackle it. This series of articles is about this specific moment, and how to tackle it in a pragmatic way.

He starts with a basic project (Acme) and works through the process of adding a new feature to it: buying an item. He talks about the team they have to work with and the architecture of his sample application (a frontend application mostly). He then works through the data structure and flow of the new feature and other functionality that should be included. He ends the post with a bit of a wrap-up of this first part and talks about the next part in the series where the application will actually be bootstrapped.

0 comments voice your opinion now!
symfony performance optimize introduction project requirements team resources series part1

Link: http://gnugat.github.io/2015/06/03/sf-differently-part-1-introduction.html

Kinsta Blog:
HHVM vs PHP 7 - The Competition Gets Closer!
May 26, 2015 @ 10:19:02

In this new post to thier blog Kinsta shares benchmark results comparing PHP 7 to HHVM, both in their own experience and some shared from other companies too.

A few years ago, engineers at Facebook went on a swashbuckling mission to rebuild the foundation of the world's most populated social network struggling to sustain acceptable performance levels. PHP was all the rage a decade ago when Facebook was gaining steam and pursuing a global target audience.

As they put it the "competition is getting closer" and the performance gap between the two is growing smaller and smaller. They talk some about the performance improvements and new features that are being worked into PHP 7 and some speculations around a Just-In-Time engine and asynchronous programming features. Then comes the benchmarks. They provide the specifications of the machine they tested on and the results of tests runs of WordPress and Drupal (based on requests per second). The rest of the article talks about two stories from other companies using HHVM, Etsy and WikiMedia, and some of the lessons that have been learned along the way.

0 comments voice your opinion now!
hhvm php7 performance benchmarks mediawiki etsy wordpress drupal

Link: https://kinsta.com/blog/hhvm-vs-php-7/

Zend:
Turbocharging the Web with PHP 7 (Infographic)
May 14, 2015 @ 09:06:35

In the /r/php subreddit on the Reddit.com site there's a new post that links over to this infographic from Zend sharing some of their own benchmark results for PHP 7 (and comparing it to other versions).

We ran performance benchmarks on popular PHP apps to compare PHP 5.6, PHP 7, and HHVM 3.7.

Their benchmarks includes results for:

  • Magento (1.9)
  • Drupal
  • WordPress
  • Laravel and Zend Framework
  • SugarCRM

They also compare PHP 7 against other languages, showing the execution in seconds when generating a Mandelbrot fractal.

0 comments voice your opinion now!
zend infographic performance benchmark php7 php56 hhvm

Link: http://www.reddit.com/r/PHP/comments/35vf1y/get_performance_insight_into_the_upcoming_release/

Osedea Blog:
Speeding up your ZF2 application
May 11, 2015 @ 16:30:36

On the Osedea blog today there's a new post showing you a few ways you can speed up your Zend Framework 2 application with a few easy code changes.

After about a year developing a Zend Framework 2 application, we decided it was time to do some optimizations. Page load times were up to several seconds on our bigger pages, and none of our pages were loading in under 2 seconds. We took a few days to profile our application and scour the various ZF2 articles out there to see what could be done to reduce the load times. We found some pretty obvious causes as well as a few inconspicuous ones. Here's a brief list of our findings, along with some steps on how to improve your ZF2 applications.

Their list includes updates around:

  • Standard vs Classmap Autoloading
  • Event Listeners
  • Making your Module.php "skinny"
  • Cache Settings
  • Session Write Close

Each tip includes a bit of code showing what will need to be changed, making it easy to drop them in and make your application nice and speedy.

0 comments voice your opinion now!
zendframework2 application speed performance

Link: http://blog.osedea.com/2015/05/11/speeding-up-your-zf2-application/

Engine Yard Blog:
Composer & Continuous Integration
April 29, 2015 @ 09:14:11

In a new post to the Engine Yard blog Nils Adermann provides an overview of using Composer with continuous integration, its role in the overall process and some good practices to follow in its use.

Continous Integration (CI) is the practice of continuously (and automatically) testing every change a developer makes. So automated tests become an integral part of the development process providing direct feedback on changes made. [...] Davey Shafik's article on Composer's Lock File explains the typical usage of composer install and update. The key takeaway is that developers should run composer update manually to explicitly update individual dependencies while composer install should be used in automated processes. This principle includes automated test environments.

He points out that using the lock file method reproduces the vendor directory exactly as it is in production and what it means for failures in your automated tests. He also talks about methods to improve the build performance to reduce time spent during the generation of the environment, including the use of the Composer cache data. He includes a few flags you can pass to Composer to reduce not only the libraries it installs but also how it fetches their contents.

0 comments voice your opinion now!
composer continuous integration build process performance automated test composerlock

Link: https://blog.engineyard.com/2015/composer-continuous-integration

BitExpert Blog:
Processing CSV files in a memory efficient way
April 23, 2015 @ 10:50:59

In their latest post Florian Horn shares some of his experience in using the PHPExcel tool to parse CSV files and the performance issues he ran into. Fortunately, he found a solution...in the form of another library.

A little while ago I had to dive deeper into the performance optimized usage of PHPExcel. Our users are uploading files like Excel or CSV with a lot data to process. Initially we used the PHPEXcel instance without any tuning of the default configuration which lead to heavy memory issues on relativly small files. So I had to avoid reading all file content at ones to the buffer (like file_get_contents does).

In my research mainly optimizing the usage of PHPExcel I came across a tiny library I am grown really fond of. It is called Goodby/CSV. Both tools have a very well grounded documentation to read in and understand the basics and the usage.

He describes some of the main differences between the two tools and includes some basic benchmark results comparing memory consumption and overall speed.

0 comments voice your opinion now!
phpexcel csv file goodbycsv process performance memory benchmark

Link: https://blog.bitexpert.de/blog/processing-csv-files-in-a-memory-efficient-way/

TechEmpower.com:
Web Framework Benchmarks - Round 10
April 22, 2015 @ 11:06:58

The TechEmpower.com site has posted round 10 of their PHP framework benchmarks that includes several test types and hardware configurations.

Round 10 of the Framework Benchmarks project is now available! It has been a little less than a year since the previous round and in that time, approximately 133 contributors have made 2,835 git commits. View Round 10 resultsThese contributions have improved the project's toolset and added many new framework test implementations.

Frameworks tested include Phalcon, Slim, Yii2, Fuel, Symfony2, Laravel and CodeIgniter. They've run tests on:

  • JSON serialization
  • Single queries (requests)
  • Multiple queries (requests)
  • Fortunes
  • Data updates
  • Plaintext output

If you click on each item in the tab list above the results, you'll also get a description of what each test entails. They also provide the results in multiple formats, not just in graphical form that include both latency and framework overhead. You can also read more commentary about the results in this related blog post.

0 comments voice your opinion now!
framework benchmark round10 performance blog

Link: https://www.techempower.com/benchmarks/#section=data-r10

Community News:
Run Geek Radio Launched & Episode 1 (Podcast)
April 21, 2015 @ 10:48:36

Adam Culp, well-known PHP community member and organizer of both the Sunshine PHP conference and ZendCon, has started up a new podcast that's targeted at blending the two things he enjoys most - geeky "stuff" and running.

My plans behind the podcast is to bring together two things I love to do…programming, and running. It only makes sense that I would want to share in both areas, and a podcast is a great way to do that. With the resurgence of podcasts lately I felt a little bit of peer pressure to attempt my own, and so far I have received wonderful reviews from PHP developers who also run, or runners who are also programmers.

You can find out more about the show over on rungeekradio.com or just tune in to the first episode and see what you think. This first show deals with conferences, user group talks and performance audit tools. If you enjoy the show, be sure to subscribe to the feed to get more episodes as they're released.

0 comments voice your opinion now!
rungeekradio ep1 podcast running technology conference usergroup performance audit tool

Link: https://rungeekradio.com/episode001/

Etsy Code as Craft Blog:
Experimenting with HHVM at Etsy
April 08, 2015 @ 08:49:20

On the Etsy "Code as Craft" blog they've posted an article about their experiences in experimenting with HHVM at Etsy and some of the differences it makes.

In 2014 Etsy's infrastructure group took on a big challenge: scale Etsy's API traffic capacity 20X. We launched many efforts simultaneously to meet the challenge, including a migration to HHVM after it showed a promising increase in throughput. Getting our code to run on HHVM was relatively easy, but we encountered many surprises as we gained confidence in the new architecture.

They start with a brief overview of what HHVM is for those that aren't sure and talk about where their focus was in these experiments. They list out some of the main reasons for trying out HHVM and the role of concurrency in their current application. They started with the "minimum viable product" and compared benchmarks between PHP 5.4 and HHVM on several endpoints. They also show how they "teed" incoming requests to both servers to ensure that the responses were the same across both. They also talk about using employee-only traffic and the overall statistics for when they released the HHVM version internally. They also talk about some of the undocumented features to keep an eye out for if you're thinking of switching: "warming up" the requests to align them in JIT memory, using perf(1) for profiling and the use of the HHVM interactive debugger (hphpd).

0 comments voice your opinion now!
hhvm etsy experiment performance throughput statistics hiphop vm

Link: https://codeascraft.com/2015/04/06/experimenting-with-hhvm-at-etsy/


Community Events

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


language php7 framework interview introduction programming composer part2 yii2 laravel list api project series application opinion podcast community example symfony

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