Timing a Templated Page

by Christian Brechbühler

I. Introduction

One of the requirements for the template system asks for efficiency:
This page documents the attempt to verify this requirement.

II. Methods

I wrote a sample page for this test. It expands four real numbers into continued fractions. I created three versions:

The reason for creating chain-frac-2.adp is that in this way, the script chain-frac-1.tcl is handled inside the templating system, and hence loaded once and cached. There is hope that this might be faster.

Normally, the templating system re-reads a file whenever the version on disk is out of date. ADP pages are compiled to TCL, and both ADP and Tcl pages are cached as Tcl procs. The parameter RefreshCache in section template can be set to always or never to affect the cacheing strategy; the latter may be useful for a production site. All timing is carried out for the three settings always, normal, and never; the associated variable is called check.

I created a script in e-Tester that requests the three pages from my development server on dev0103-001. One timing of requesting a page isn't very expressive. A lot of factors affect the page load time. To offset these and get better results, I repeatedly request the pages. For the timing, I have e-Tester iterate this script 200 times. To compesate for varying load on the machine, i ran the iteration twice for each setting of RefreshCache at different times of the day.

The timing information is taken from the error log file entries that the request processor produces with parameter LogDebugP=1. For finer granularity I changed rp_debug to divide the clock clicks (microsecond) difference by 1000.0 instead of 1000. Delivering a page gives us 15 log file entries with timestamps. I treat the first one (? ms) as 0. There must be no other page requests from this AOLserver during the measurement. I note the length of the error log before and after one run of the script. Afterwards I cut out the error log sections indicated by these positions into files never, normal, and always.

The following steps extract the relevant information and bring it in a form suitable for gnuplot.