Part of the EllisLab Network

Blog & News

Lisa Wess
Director of Community Services

Building a Bug Tracker: Diagnostics

ExpressionEngine includes a variety of tools to assess how well your templates are optimized.  These include telling you the total queries, elapsed time, and template debugging.

Some of these will be extremely useful as we build the site.  Before we begin pulling out our weblog data, it would be good to have some of this information immediately available.

The very first thing that we want to do is open up inc/.footer and place this code into it:

Powered by <a href="http://expressionengine.com">ExpressionEngine</a> :: {total_queries} queries in {elapsed_time} seconds

For those following on EECore, please remember the link back to ExpressionEngine is required.

The other information we placed there - total queries and elapsed time - lets us know how long it took to render the page, and how many queries were needed. 

Another tip is to use the Template Debugger.  You can find this at CP Home ›  Admin ›  System Preferences ›  Output and Debugging Preferences, under Display Template Debugging.  There’s no need to keep this on permanently; however, if you’re ever uncertain about what your template is doing - remember to turn this on, along with Display SQL Queries and PHP Errors shown to SuperAdmins.

We’re now entirely set up to begin pulling our data out and manipulating it in variety of interesting ways. With these diagnostic tools, we’ll be able to see, immediately, the impact of our changes.  If you haven’t yet added any entries to your Bug Tracker weblog, definitely make sure that is done by next week, as we’ll begin working with that data in the next article.