From: Chris N. <pu...@po...> - 2000-12-05 14:57:33
|
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/ |