Drupal 7 performance recommendations now available in Blackfire
Following up on their Drupal 8 performance recommendations contribution, EvolvingWeb is back with Drupal 7.
Note from the Blackfire.io team: Jigar Mehta works for EvolvingWeb. Partnering with Blackfire, EvolvingWeb previously contributed by creating the Drupal 8 recommendations.
Recommendations for Drupal 7 are available for Profiler, Premium and Enterprise subscribers.
Contributing to Blackfire
The Drupal dev team at Evolving Web has incorporated PHP profiling with Blackfire.io as part of the delivery process for every project we work on. After 18 months, we ran into the same Drupal performance gotchas, and created a set of Blackfire metrics corresponding so that the most common ones would be caught automatically. Today we are happy to share that our Drupal 7 and Drupal 8 metrics have been integrated into the core Blackfire.io product, as part of its performance recommendations feature.
If you’ve been attending Drupalcons and camps recently, you might already have attended one of Evolving Web’s talks explaining the value of Blackfire for improving your Drupal code performance. Here’s a few real-world examples where profiling has saved our stub.
Drupal 7 recommendations
In a typical development project, things inevitably get rushed towards the end. Someone might accidentally export and commit their dev configurations to prod, turning off key optimizations. With our Drupal integration, Blackfire will now automatically run against a checklist of best performance practices and immediately raise a warning like You should enable caching for your views
or You should disable automated cron
.
Profiling FTW
While functionality bugs can be very obvious (eg. the infamous white screen of death), performance bugs can surreptitiously suck away at your precious server resources for months, before coming up to the surface at the worst possible time. We had a nightly content sync that seemingly worked fine. But by profiling it, we noticed that the memory utilization is absurdly high. You might say to yourself, what could be wrong, my code is just loading some nodes and updating their titles. But by running Blackfire, you find that the loaded entities are all being statically cached. With thousands of entities to update, the sync process might have soon run out of memory and crashed! Once we have found the problem, the fix is often trivial.
Alternatively, your Drupal pages might be super fast 98% of the time, but be painfully slow occasionally, or when logged in. This may be because Drupal’s various caches are masking the problem, and it becomes obvious only when they’re disabled or expired. Fortunately with Blackfire, it’s usually straightforward to figure out how to profile the page with cache disabled, getting to the root of the problem.
Some time worth spending
We try to reserve at least a full day of PHP performance profiling for every project we work on, to be sure about the quality of code we deliver. Generally we find a few small things which yield a 10-20% improvement in performance by spending a couple of hours, and sometimes much more.
With these new Drupal 7 recommendations being baked in, it’s even easier to get find improvements fast.
Learn more
To learn more about the approach to using Blackfire, we recommend you read the excellent 24 Days of Blackfire guide, which was really helped us when we were getting started. Then you can check out some of Evolving Web’s Drupal-specific blog posts:
Give it a try, and happy profiling!