Many thanks; I think your changes did the trick.  The requests per
second metric is now just cut in half executing six macros vs. executing
no macros, which seems like a reasonable reduction given the extra
processing needed. Unix stat() calls on the .pt files shows that they're
read once, not with every request.

Here are the numbers after getting revision 2536 of ZPTKit:

With macros:
============
Total transferred:      363285 bytes
HTML transferred:       347850 bytes
Requests per second:    87.87 [#/sec] (mean)
Time per request:       56.90 [ms] (mean)
Time per request:       11.38 [ms] (mean, across all concurrent
requests)
Transfer rate:          638.46 [Kbytes/sec] received

Without macros:
===============
Total transferred:      369935 bytes
HTML transferred:       354195 bytes
Requests per second:    176.68 [#/sec] (mean)
Time per request:       28.30 [ms] (mean)
Time per request:       5.66 [ms] (mean, across all concurrent requests)
Transfer rate:          1307.19 [Kbytes/sec] received

Thanks again for the rapid response.

Cheers!
--
David Hancock | [EMAIL PROTECTED] | 410-266-4384 


-----Original Message-----
From: Ian Bicking [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 21, 2005 12:58 PM
To: Hancock, David (DHANCOCK)
Cc: webware-discuss@lists.sourceforge.net
Subject: Re: [Webware-discuss] ZPTKit and standard_template question


Hancock, David (DHANCOCK) wrote:
> Thanks for the ideas; I'll see if I can implement one or more (or get
> somebody smarter than me at work to help me).
> 
> Regarding the 200:1 performance difference noted, I just checked
again,
> and got the same results. As Ian asked, I did a macros vs. no-macros
> comparison, and use ApacheBench to test. 

OK, so it really is the macro that's causing the problem.  Or, rather, 
the use of fetching a template through "here".  I'm pretty sure this is 
because ZPTComponent keeps track of used templates, and returns them to 
the pool once the request is through -- but it only knows about the 
templates that are directly created through the servlet, not indirect 
ones, so things like standard_template.pt are never returned to the
pool.

But I think I was just being too defensive with the pooling, I don't 
think it's needed at all.  I just committed changes to ZPTKit's trunk 
(r2536) that reuse templates much more actively.  I think I can actually

rip out large parts of templatetools and zptcomponent, but I just made 
the minimal changes for now.

-- 
Ian Bicking  /  [EMAIL PROTECTED]  / http://blog.ianbicking.org


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click
_______________________________________________
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to