profiling — RESTfull API optimization summary

Our Smart Gamma Symfony2 backend team got a task to optimize a performance for one project that we are developing and supporting related with a live streaming service and based on RESTfull API.

Despite well-known tools as Xdebug and Xhprof, we decided to try a great tool from SensioLabs —

From one side, it is another profiling tool like Xdebug or Xhprof, but on our opinion, it has some benefits even with free “Hack” package.

It was also one small positive point about attention from the support team. Thibaut LANCRENON contacted us and proposed one hour web meeting to present main features of the tool. So guys made a demo for us and answered some technical questions.

The main pros of Blackfire are a silent state in sleep mode in production and small overhead while profiling is active.

As simple metric to measure optimization progress we took out auto test scenarios, more exactly, we compared the execution time of our tests “before” and “after”, that contains PHPUnit functional tests for REST API and BDD Behat tests for admin part and it reflects a model of our system.

There is a screenshot of batch tests from Jenkins CI server, before optimization:

start performance metric

Where we can see that it took 18 minutes to pass all functional tests.

And after our optimization with we received next results:

optimization progress

Therefore, we were able to make our system about 2 times faster with the same amount of tests in PHPUnit and Behat suites.

We are going to share more details in our next posts to explain what exactly was optimized, but right now just wanted to say “Thanks” to and SensioLab for the great tool.

SmartGamma Team

Originally published at

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store