On Tue, 2004-03-09 at 16:55, Jason Gottshall wrote: > if there are > multiple httpd processes, the Template::Service object along with its > cached templates will take up memory in each httpd process.
That's correct. > Doesn't > it make more sense in this situation to accept the small performance delay > to compile a template when it's a relatively infrequent occurrence and it > keeps the memory pool smaller? The thing is, it's really a very large performance difference. > What would be really > great would be to have the ability to cache the common/global templates and > not cache some of the deeper modular components. But that would require a > rewrite of the Provider module... There are a couple of options that you're missing here. The first is that you should at least enable the COMPILE_DIR option, which saves the perl code generated when compiling the templates to disk. This doesn't cost you memory, and improves performance considerably. The other relevant piece is that you can set a cache size, and that will keep an LRU cache of your templates in memory up to that number of templates. So, if you have 1000 templates, but 20 of them get used a lot and the rest don't, setting that to something close to 20 will keep the most important ones in memory and leave out the rest. Read the caching part of Template::Manual::Config for more. - Perrin _______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
