2010/6/15 Emiliano Martinez Contreras <[email protected]>: > Hi guys, > > We've been having serious problems with the performance of a high traffic > site. Finally we discovered that most of the time is spent in template > compilation. I am using templetor and I like it a lot, I would not like to > change, moreover, given the amount of templates I have it would be a killer > to change. > > I installed python profiler and profiled the site, url visits that require > template compilation take more or less 0,4s of cpu, on the other hand json > serving for example takes only 0,01s, which is more or less coherent. I > would like to reduce that 0,4s and I read that compiling templetor templates > and using GAE render (I am not using GAE btw) may reduce that time by an > order of magnitude. > > So I've followed these instructions: > > http://webpy.org/cookbook/templates_on_gae > > The thing is that template.py compile does not produce a correct result, it > muddles up the indentation of for loops and if/else conditions inside the > templates, making it impossible to import the outcome due to indentation > erros. > > Any clue?
Compiling templates should not be performance problem because it is done only once at the beginning. If it is recompiling the templates every time, then there is something wrong with your settings. What is the version of web.py that you are using? Can you provide a sample template that is failing? -- You received this message because you are subscribed to the Google Groups "web.py" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/webpy?hl=en.
