View Categories

Load Time Tracking

Load time tracking shows how long each PHP snippet takes to load, so you can find a snippet that is slowing your site down.

Turning it on #

Go to Settings, check Performance tracking, and save. It is off by default. Turn it on while you are investigating performance and off again afterwards.

Where the figures appear #

  • The snippets list gains a Load time column showing each PHP snippet’s average. Hover over a figure to see the most recent and slowest times.
  • A PHP snippet’s edit screen shows a Load Time card with the average, most recent and slowest times, how many runs were sampled, and when the last one was.

A snippet shows “No data yet” until it has run on a page load with tracking turned on.

What is measured #

The figure is the time taken to load the snippet’s code when its hook fires, including any work the code does straight away. If the snippet adds its own actions or filters, the work those do later in the page load is not included.

To keep the overhead low on busy sites, timings are saved at most once a minute, so the figures are a sample rather than a record of every page load. The average gives more weight to recent runs. A snippet’s figures start again whenever its code changes.

Only PHP snippets are timed. JavaScript and CSS run in the visitor’s browser, where your browser’s developer tools are the right place to measure them.