Home / Comment permalink

5 Mistakes to Avoid on your Drupal Website - Number 3: Performance

Performance is crucial for providing a great user experience. If the site is slow or balky, even great functionality won’t keep the site visitor engaged.

Best Practices

The first action for improving performance is analyzing what the website is doing. With the answer to this question, optimize as much as possible, then implement caching.


  • Devel for viewing database queries which run on each page. 
  • XhProf is generally the best tool to start with. Profiling is what helps you find the issues to begin with. Read about Using XHProf with Acquia Cloud
  • New Relic - This service will analyze your site at a low level and report slow database queries, external queries and specific pages. More info about New Relic which is part of Acquia Network.
  • Yottaa - Focuses on front-end performance. This service will tell you how fast your site loads in different locations around the world.
  • Read more about Tools for parsing a slow query log

Optimize—Common Problem Areas:

  • ŽComplex queries that take too much time and don’t use an index.
  • Functions that are called too often.
  • Keeping unused modules enabled on your site. Disable any unused modules.
  • Misconfiguring cron. See more about configuring cron.
  • Using the default views pager, which requires an additional COUNT query. Use Views Litepager, which provides pagers without the count function.
  • Database logging (dblog) is enabled by default in Drupal 7, and errors can fill up your database quickly. One common solution is to use syslog instead, but this merely masks the problem by making the logs less accessible. A better solution is to fix all PHP notices and warnings to reduce logging overhead.
  • Use the Fast 404 module to serve static 404s for image, icon, CSS, or other static files, rather than bootstrapping Drupal.
  • Not aggregating CSS and Javascript files. See how to turn CSS and JavaScript aggregation on in Drupal.

Caching—Common Mistakes:

  • ŽMost common: No cache strategy at all. Not taking the time to understand how content can be cached (per user, per group, per role, etc) is the worst mistake.
  • Caches cleared too often.
  • Caching at too low a level; such as using views cache instead of Blocks or Panels pane cache.
  • Basic caching, such as block caching or panels pane caching.
  • Caching strategy too complex for real needs of site.

Recommended resources

Practical performance tips in Acquia's Library: Improving website performance.

Thanks to my colleague, Mark Sonnabaum for reviewing content in this blog post!

Sign up to our training newsletter

Sign up to our training newsletter to be notified about more tutorials for you. You'll also get notified about upcoming training events and online courses available.


Posted on by Greg Boggs (not verified).

This is a great post with many things I hadn't thought of before.

An extremely important step any Drupal developer can take to improve the performance of a Drupal site is to move the JavaScript to the footer and make sure CSS is in the head. Web Basics from 1999 that are often overlooked in today's high speed web.

Other important steps include using a CDN, and correctly saving images (or avoiding PNG all together for content editors who don't know how to save PNG files for the web).

Slides from my recent performance talk: https: //docs.google.com/a/humhost.com/presentation/d/1GsI1nJn-2fVQdhIZsw...< /a>

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Filtered HTML

  • Use [acphone_sales], [acphone_sales_text], [acphone_support], [acphone_international], [acphone_devcloud], [acphone_extra1] and [acphone_extra2] as placeholders for Acquia phone numbers. Add class "acquia-phones-link" to wrapper element to make number a link.
  • To post pieces of code, surround them with <code>...</code> tags. For PHP code, you can use <?php ... ?>, which will also colour it based on syntax.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <h4> <h5> <h2> <img>
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.