> Hmm, there certainly seems to be. As a test I'm creating a list of 10
> widgets in the request handler (but not displaying them). Just
> creating the widgets every time adds about 30 ms to each request. If
> in each of these widgets I then pass template=None, then a negligble
> amount of time is added to the original request time for the
> construction of the same 10 widgets each time. Looking through the
> widget code I see that the only call that would be left out in this
> test would be the load_kid_template call in the base widget class.
>
> I would have thought that in creating separate instances of the
> widgets at runtime the kid template would have to be loaded (and
> discarded) every time with the widget. I think that kid only disk-
> caches templates that are already stored on the disk as .kid files.
> This is not the case for most of the widgets.

Ah, that might be the case - I've been playing around with the disk-based 
kid-templates because of i18n-issues with performance, so I know for sure 
that these are compiled once and reused (until file changes are detected of 
course).

But for the mostly inlined templates of widgets, that doesn't seem to be true.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to