If you’re reading this post, you’re probably a Drupal developer with a website that’s about as speedy as a child eating brussel sprouts.

If you were not the original developer on the project, finding the cause of your performance issues can be tricky. Here are a few things you can do to get your website running faster.

1. Check for unecessary modules

Drupal.org has over 8,100 contributed modules available for free download. Modules are provided with a Creative Commons license and are developed by people all over the world – many working with others to create the best tool they can.

One downside to this freedom is it’s common to see Drupal websites suffering from ‘module bloat’. These are sites where every little problem appears to have been solved by installing a module when a tweak to a theme or existing module may have been a better choice.

If your website has started to run slowly, it’s a good idea to first check your installed modules to see if there’s anything in there that you don’t need. It may be that a bug-ridden module was added during development but is no longer in use.

2. Install the Devel module

Ok, I realise that I just recommended you remove modules (and now I’m asking you to install one) but this is a great module – and you can uninstall it when you’ve found the cause of your perfomance issues.

The Devel module from Moshe Weitzman generates summary reports to show how long each process takes to complete. Information such as average run time for each database query is clearly visible so that these reports can be used for diagnosing issues. The module can also show reports for page generation times and memory usage – so if you’ve got a particular page that is performing badly it will become apparent. More information about the Devel module

3. Use the in-built Drupal performance settings

Visit Admin > Performance to tweak the caching settings for your site.

The Performance page will also allow you to combine your CSS files into one, cleaning up your html and improving performance. Note: Don’t turn this option on until you’re done making CSS changes to your website.

4. Use the YSlow plugin for Firefox

Developed by @souders back when he was at Yahoo, YSlow is a simple easy-to-use plugin for Firebug (Firefox plugin).

YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages – yahoo.com

Simply install the plugin, visit your website and click the ‘Run test’ button. The plugin rates your website against a set of criteria with a focus on page load time. Some important things YSlow will look for:

Excessive http requests
The more elements you have to load on a page, the longer it’s going to take. YSlow will provide recommendations such as combining background images using CSS sprites or combining CSS files.

Treatment of Javascript
Excessive or poorly written Javascript can slow a page down significantly. YSlow checks to see how many scripts you’re loading and when – it’s recommended to place JS scripts at the bottom of the page. Check to make sure you’re only loading JS scripts and libraries when you need them – e.g. try to avoid loading JQuery on every page if you’re only going to need it on the homepage.

More information and download YSlow

Further reading: