Back to Top

Blackfire Load Testing with Magento and Magento2

Updated 4 March 2024

Blackfire Load Testing with Magento and Magento2 – As we all know that if a webpage takes too much time in loading then no one will visit that website, so it is very important for a website a take a less load time. We all know that magento is a complex framework and many blocks and files are called in a single page, so it’s very hard to recognise a method which is taking too much time in loading a page, so using blackfire we can find which method is taking too much time in loading a page.

We know that there are many caching tools which is used to speedup the performance of a website but if there is something wrong with code then nothing will help you out, you will need to optimise the code. So that’s why I am explaining here about blackfire load testing with magento.

For more information about blackfire please check following link –

Blackfire Installation – For this we will need to follow few simple steps-

Step 1 – If want to profile your page via browser then you will need to install a blackfire extension for chrome and for this please follow the link – .

Searching for an experienced
Magento Company ?
Find out More

Step 2 – Now follow the simple instructions given in link to install the blackfire on your magento server.

Step 3 –  Now blackfire is successfully installed in your magento.

Blackfire Load Testing with Magento – Here I am profiling the magento home page with backfire.


Now click on the “Profile!” button to test load time of home page.


In the above screenshot we can see that home page is taking 520ms time and now I am calling new product block in home page to display 5 recently added products. Please check the screenshot after adding new product block to home page.


Now home page is taking 802ms in loading page, and when I checked it’s profile graph then we can see the new_grid.phtml is taking 254ms.


I checked the productCollection() method and optimised that method as much as possible, now this we can see that the home page is taking 760ms instead of 802ms, so in this way we can optimise the webpage using blackfire.

Code Before Optimisation –

$collection = Mage::getResourceModel('catalog/product_collection');

        $collection = $this->_addProductAttributesAndPrices($collection)
            ->addAttributeToSort('created_at', 'desc');
        return $collection;

Code After Optimisation –

$collection = Mage::getResourceModel('catalog/product_collection');

        $collection = $this->_addProductAttributesAndPrices($collection)
            ->addAttributeToSort('created_at', 'desc')
        return $collection;

Also blackfires offers some built-in metrics for magento and some recommendations which will be helpful to improve the performance of your website.

. . .

Leave a Comment

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

Be the first to comment.

Back to Top

Message Sent!

If you have more details or questions, you can reply to the received confirmation email.

Back to Home