SitePoint PHP Blog: PHP-level Performance Optimization with Blackfire
On the SitePoint PHP blog they've posted a tutorial that continues their series covering the creation of a simple image gallery blog application. In this latest part of the series the author covers the use of the Blackfire.io service for performance testing.
Throughout the past few months, we’ve introduced Blackfire and ways in which it can be used to detect application performance bottlenecks. In this post, we’ll apply it to our freshly started project to try and find the low-points and low-hanging fruit which we can pick to improve our app’s performance.If you’re using Homestead Improved (and you should be), Blackfire is already installed.
While it’s useful to be introduced to Blackfire before diving into this, applying the steps in this post won’t require any prior knowledge; we’ll start from zero.
The tutorial walks you through some of the basics of Blackfire and what kind of information it will report back. After a small change to the Homestead YAML configuration, they show how to profile the landing page and what the resulting graph looks like. It then goes through the code, finding each of the pain points and refactoring them to improve performance.