As a digital agency that has a large footprint in the e-commerce landscape, we are often inheriting Magento code bases from merchants or other agencies that have been gung-ho on adding features to their site, without regard for performance. Likewise, we utilize an array of extensions from the Magento ecosystem that are more concerned with feature functionality than performance.

Releasing features rapidly is important, but neglecting performance bottlenecks can result in substantial losses.

Releasing features in a rapid way is important, but neglecting performance bottlenecks can result in substantial losses in conversion due to slowness, reputation due to crashing servers, and relationships to the merchant that you are supporting when nothing seems to run smoothly. Blackfire.io has made it so easy to install performance profile PHP applications that there should be no excuse to release slow, performance-problem-ridden, code.

For Magento, there are two existing, fairly well-known, ways to test the performance of a Magento site. The first is by using Magento’s Varien_Profiler. Magento has strategically placed profiling triggers throughout the site, which can be added to to accommodate new features that are being written. The output of the profiler looks something like this, and will appear at the bottom of the page that is loaded.

Robie_Magento_Bottleneck_1

The second well-known profiling tool is an open-source project released by Facebook years ago called xhprof. Xhprof provides a more usable interface that allows you to drill down through the call stack and see more granular information. These results can be saved and viewed later for manual comparison. A resulting xhprof output might look something like:

Robie_Magento_Bottleneck_2

The drawbacks for these two methods are that they can be invasive to the code (needing to alter code), the interface is not easy to navigate, and it is difficult to secure the performance results so that they can be viewable through the web when profiling production performance bottlenecks.

Blackfire.io solves the problems making the install of the server software as such that there is no configuration needed for the Magento application itself. You can even install the profiling software on production environments because the overhead is negligible. The interface is a beautiful web interface through Blackfire.io’s website. With Blackfire.io, you intentionally profile each request, ensuring that you do not forget to disable the profiling. The output of Blackfire.io provides two different views: a list view and a graph view.

Robie_Magento_Bottleneck_3

One of the best features of Blackfire.io is the ability to incrementally make changes to your code, profile the requests, and compare them within the tool. The interface shows positive and negative deltas for each call in the call stack, and will show deviations in the graph view where your call stack differs. This allows a developer to compare requests from out-of-the-box Magento with the customized build for the merchant.

Blackfire.io offers more features to accommodate automated performance testing, and a tiered pricing structure to accommodate larger enterprise teams. You can find out more about that at https://blackfire.io.

Again, there is no excuse anymore to forgo performance testing. Take a half hour out of your day to install Blackfire.io on your development servers. My bet is that you will find performance problems in your codebase within 15 minutes after installation.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Comments