profiling — RESTfull API optimization summary

Smart Gamma
May 18, 2016 · 2 min read

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:

Image for post
Image for post
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:

Image for post
Image for post
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

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

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