Drupal's Theme Registry Rebuild: turn it off!

Ryan Weal
Published 2010-07-07
Graph of horrible mysql performance when Drupal theme registry rebuild setting is enabled

Drupal's Zen theme starter kit includes this nifty feature to rebuild your theme each time you visit. It prevents caching so you always see your fresh new code. For a developer this is some handy candy. Rife with warnings about performance if the settings actually appear, you should take note that if you are using Zen you need to explicitly disable this setting (yes, even if you can't see the option for it). On one of my larger client sites I found that due to a misconfiguration in the theme-settings.php file the options for the theme were not showing up. You can normally find this caching option on your zen-based theme's configuration page. Upon doing a find-and-replace in my theme-settings.php file and unchecking the "Rebuild theme registry on every page." option in your Zen theme things should be a lot faster on your website. The graph above shows the impact this change had on my server. As you can see, the site in question is by far my biggest traffic driver on this host and it was wasting a LOT of database traffic (note the drop off at around 3pm, it should be pretty obvious). Also be sure to check your "performance" settings under "site configuration" to enable css caching/compression for an added kick.

Thanks for Reading!
Ryan Weal (LinkedIn)
🍪 ☕
Send a comment 💬
Published by Kafei Interactive