[ZPT] ZPT Speed Tutorial Wanted
Andy Meier
andy@onyourmark.com
Mon, 16 Sep 2002 11:01:11 -0500
> This is realy a much bigger difference than we've seen. We've seen page
> templates take 2-3x longer than DTML, not 40x. Are you sure you are
> comparing ZPT and DTML templates that do the same thing?
The benchmark I ran was with ab and is very non-scientific but both pages
should do about the same amount of work to display their respective content.
> It would be helpful to create a benchmark that does the same thing in
> ZPT and DTML and that shows this speed difference. We do have a project
> under way at ZC to do another round of performance improvements. We have
> a menchmark we are using, but you might be able to provide a better one.
I'll do more thorough testing this weekend (sooner if I have time) and see if
I can pinpoint exactly where the bottleneck lies. 400ms represents a LOT of
work on a 1.7Ghz server so it shouldn't be too difficult to track down the
offending code.
I included the two pages I was using for my quick, off-the-cuff testing for
reference.
-Andy
My test ZPT was:
---- CUT ALONG THE DOTTED LINE ----
<html>
<head>
<title tal:content="template/title">The title</title>
</head>
<body bgcolor="#000000" text="#cccccc" link="ff0000" vlink="ff4444">
<h3 class="mainpage">Welcome to Haunted Wisconsin! </h3>
</body>
</html>
---- CUT ALONG THE DOTTED LINE ----
and the DTML document was
---- CUT ALONG THE DOTTED LINE ----
<dtml-var title>
<form method="post">
<input type="hidden" name="id" value="00000001">
<table cellpadding="2" cellspacing="1" border="0">
<tr>
<td colspan="2">What is a fair price to pay for a ticket to a haunted
attraction?</td>
</tr>
<tr>
<td width="10"><input type="radio" name="answer"
value="0"></td>
<td align="left">$7</td>
</tr>
<tr>
<td width="10"><input type="radio" name="answer"
value="1"></td>
<td align="left">$8</td>
</tr>
<tr>
<td width="10"><input type="radio" name="answer"
value="2"></td>
<td align="left">$9</td>
</tr>
<tr>
<td width="10"><input type="radio" name="answer"
value="3"></td>
<td align="left">$10 or more</td>
</tr>
<tr>
<td width="10"><input type="radio" name="answer"
value="4"></td>
<td align="left">It depends on the haunt.</td>
</tr>
<tr>
<td colspan="2"><input type="submit" name="vote" value="Vote"></td>
</tr>
</table>
</form>
---- CUT ALONG THE DOTTED LINE ----