Lets's suppose I have downloaded the theme "footheme" to my sites/all/themes directory, and need only simples CSS changes and a few tweaks on the page.tpl.php template file. Now I have two options:

  1. Create a new theme under sites/mysite.example.com/themes/mytheme and use "base theme = footheme" in mytheme.info file. Next I'd create/copy the style.css and page.tpl.php from footheme and make my adjustments.
  2. Copy the entire "footheme" directory to sites/mysite.example.com/themes/mytheme, effectively rename the "footheme" to "mytheme" (e.g. rename .info file, change function names in template.php etc.) and only then make my adjustments in style.css and page.tpl.php.

I suppose that there's no noticeable perfomance difference in using either alternative on light traffic sites.

But my question in: for a high traffic site, is there any difference in using option 1 or 2 above regarding performance (DB load, CPU processing etc.)?

Comments

Garrett Albright’s picture

Drupal builds and caches a "registry" of where it should look for various theming files/functions. When that registry is being built, there will be a significant performance penalty, but once it's cached, then everything's golden.

Some starter themes such as Zen have an option to rebuild this registry on every page load for testing purposes, effectively bypassing the cache. Once your site's ready to go live, simply turn this feature off - in Zen's case, it prints a warning message on the pages when you have this feature enabled, so it shouldn't be too hard to remember to do so.

flaviovs’s picture

Thanks for replying, Garrett. It makes sense to me.