From: Patrick G. <cap...@sl...> - 2000-12-05 15:43:36
|
Chris Nandor wrote: doesn't really look bad at all. It seems to primarily consist of $value .= ..., which totally makes sense when you consider templates deal with mainly output. It looks like the code before we removed the content! > OK, attached are a pair of compiled templates. I think the reason why I > had performance problems with these templates before was that I turned off > caching by accident. I need to run some more tests, but I though you might > want to see the compiled versions of the templates. You can see why if I > have 50 comments to view, and this code is created from the template for > each, it would take a long time. However, if this code is created only > once, and executed a bunch of times from a subroutine reference stored in > the Template object, it should be quite quick. > > In fact, I don't see any significant reason why code in a template should > execute more slowly than code in a module or script, except that code in > the template is calling more object methods than you would in a script or > module, which is less efficient. But I really don't think that difference > will be significant. > > So what does all this mean? I am going to load up my DB withg a bunch of > comments and see what happens. :-) > > We still need to discuss caching of templates. There's a lot to consider. > First, do we want to keep templates in memory for the life of an httpd > process? If not, how should we decide to expire them? Over time, or with > an LRU, or based on a timestamp in the DB? And do we want to cache the > templates on disk, so all the httpds can share the compiled templates, so > they are compiled only once? If we do that, how do we decide to expire > them? As I said, a lot to consider there. We can discuss it some time > this week. > > -- > Chris Nandor pu...@po... http://pudge.net/ > Open Source Development Network pu...@os... http://osdn.com/ > > ------------------------------------------------------------------------ > Name: header.ttc > header.ttc Type: unspecified type (application/octet-stream) > Encoding: x-uuencode > > Name: dispComment.ttc > dispComment.ttc Type: unspecified type (application/octet-stream) > Encoding: x-uuencode -- Patrick Galbraith Open Source Development Network Senior Software Developer 50 Nagog Park Slash Code Development Team Acton, MA 01720 "Energy and Persistence conquer all things". Benjamin Franklin |