When we think about factors determining our choice of Starter theme how often do we think of performance? I'd hazard a guess very few consider factors such as database queries and memory usage, whereas we are more inclined to be interested in ease of theming, documentation and support.
These tests compare 6 Drupal starter themesâ€”Stark, Framework, Ninesixty, Zen and both Genesis starter subthemes (6.x-2.x-dev). For these tests each theme was in "live production mode", meaning that any registry rebuild features were disabled and for Ninesixty the debug stylesheet was unset.
Those things aside this is at least an interesting comparison and I hope to encourage you to factor in performance when making your starter theme selection.
## Page weight
|Theme||Page size (bytes)||Code size (bytes)||Text size (bytes)||Code to text ratio (%)|
This test was performed on the home page of the starter themes test site and measures the HTML output only (CSS is not included). I selected the homepage because it includes a fair representation of the HTML output of each theme's templatesâ€”page, node & block.
The tool used was http://www.rankquest.com/tools/Text-Ratio.php. This was selected because it does not require a CAPTCHA to be filled out for every test.
I think we need to take the actual results with a grain of salt, other tools returned different values however the *best to worst* order remained consistent no matter what tool was used.
**Genesis LITE** has the smallest Page size and the best Code to text ratio. This was surprising for me, I fully expected Stark to be at the top.
**Zen STARTERKIT** has the largest Page size and worst Code to content ratio.
The differences here are minimal. The spread from smallest to largest is a mere 2.9kb in file size and a shave over 3% in code to content ratio. These are not dramatic differences and would only be a factor for sites demanding optimum performance and code/content ratios.
|Stark||Framework||Zen STARTERKIT||Ninesixty||Genesis LITE||Genesis Subtheme|
The size of the CSS files reflects in the most part the methodology of the starter theme.
**Stark** has the smallest CSS file, however it only has one stylesheet (layout.css) and the themer is expected to add all required stylesheets, selectors and declarations. In short Stark is a *bottom-up* approach to theming.
**Genesis** on the other extreme has the largest CSS file. This reflects the Genesis *top-down* theming approach, where there are many selectors with empty declaration blocks included in the starter themeâ€”which you would either use or delete.
The CSS Tidy file size shows that with all empty selectors removed the files can be significantly smaller - this is true of the Zen STARTERKIT also, although not as dramatic.
**Ninesixty** loads the entire layout framework by default, however in production sites you would remove the unused layout selectors and thus the file is likely to be significantly smaller.
\* CSS Tidy: http://floele.flyspray.org/csstidy//css_optimiser.php, Compression: Highest, Compress colors, Compress font weight, Lower case selectors, Remove unnecessary backslashes, Remove unnecessary semi-colons.
## Performance logging
|Framework||Stark||Ninesixty||Genesis LITE||Genesis Subtheme||Zen STARTERKIT|
|Average memory per page (mb)||12.0||12.1||12.1||12.1||12.1||12.1|
|milliseconds per page||382.71||377.29||388.71||392.00||393.57||399.14|
This test used the Performance Logging module that comes with the Devel module. I used Summary logging. For the test I looked at the exact same pages in the exact same order for each theme. The cache was cleared between tests and the Performance summary table truncated. A total of 7 paths and 23 page accesses were recorded and averaged. This test was performed 3 times and the results were practically identical each time.
Clearly the themes are very similar across the board. Only the Framework theme reports slightly less memory usage, while the Stark theme was the quickest and Zen STARTERKIT the slowest.
## Database Queries
|Stark||Framework||Ninesixty||Genesis LITE||Genesis Subtheme||Zen STARTERKIT|
These stats were collected with the Devel module. Again the differences are not overly dramatic.
**Stark and Framework** appear to add no additional database queries.
**Zen STARTERKIT** has 4 extra database queries for each page load. This does not seem overly significant.
Your choice of starter theme will depend on many factors beyond just performance. This brief summary of performance metrics at least shows us there are differences and that they could be a factor in determining starter theme selection.
So what are my picks? Not sure that would be fair, I am biased. However, based purely on the stats:
1. For light page-weight and best code to content ratio: **Genesis Lite** - hands down, by far the pick of the bunch.
2. For speed: **Stark**. Small footprint and no additional database queries.
3. The **Framework** theme fairs well across most metrics.
Last updated 2nd May, 2009 - 2:09pm