Hi Malthe Do you mean it parses all templates on instance startup. If so that would be prohibitively expensive if you have a lot of templates. And startup time (just processing all the zcml, and all the other imports) is problematic as it is. (In the project just compeleted www.polytechnic.wa.edu.au, there is 131 template files. (page templates and metal macros). Our startup time for a cold instance without anything in memcache is between 4 and 8 secs. If appengine is having problems then that can blow out a very long way)
Do you have any idea how much it costs to parse a template first time round vs traditional zpt. I am currently caching zope.pagetemplate based templates on first use. I am going to have to have a bit of play, but parsing all templates on startup has me really worried. Memcache would alleviate that somewhat but any new instance would then still have to check to see if every template exists in memcache on startup and parse missing ones. However the main problem with a memcache strategy on google is such that anything can disappear from it at any time, which means if it's gone from memcache then you would have to parse on use of the template. Which sort of counters the whole approach. I wonder if the datastore could be used as a first line storage for the compiled templates. The they could be loaded and then cached in memcache, that way the cost would not be too high if the are not present as the loader could grab them from the datastore. You would then have to trigger re-compilation of all templates on a new deployment. Which could have its own set of headaches. (But it could mean you could update the templates indepenantly of a deployment.) Hmm, will definately have too play here. T On Thu, Feb 4, 2010 at 4:31 PM, Malthe Borch <mbo...@gmail.com> wrote: > On 4 February 2010 06:21, Tim Hoffman <zutes...@gmail.com> wrote: >> So does this mean compiled code (.py) is deployed or does it parse - >> generate etc.... on each instance startup >> and possibly cache generated code in the module ..... given you can't >> write to the filesystem. > > It parses and generates and each instance startup; to improve > performance you could memcache the generated .py files. We might want > to have support for that in the core package, but I'd like to see > someone propose a patch for that since I'm not actively using the GAE > right now myself. > > \malthe > _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev