On 12 August 2011 10:05, Robert Forkel <xrotw...@googlemail.com> wrote:
> hm. I do not really follow. I'll try to explain my problem in more
> detail. First, I only use Chameleon from within deform, the rest of my
> app uses mako. Now I noticed that form rendering was slow and that was
> because of the template loader parsing the templates all the time.
> As far as I can see in chameleon.loader, the caching is done per
> instance of TemplateLoader. Now deform instantiates a TemplateLoader
> when a deform.template.ZPTRendererFactory is instantiated. When using
> the default_renderer this is only done once on import of deform and
> caching will work - i guess. But to be able to pass a translator per
> request, I instantiate a new ZPTRendererFactory per request as well -
> and no caching is possible.

I see.

What I can tell you is that Pyramid wants to do this for you, i.e. it
automatically sets a translator for you. Instead of trying to do this
yourself, it would be better to use the built-in language negotiation.

If you're still unsure, maybe let's try and see your code to see if
something's funky in your setup.

\malthe

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to