Re[4]: [Zope-CMF] Excessive time load when processing relations

Rainer Thaden Rainer Thaden <thadi@gmx.de>
Fri, 15 Nov 2002 08:30:56 +0100


DM>  > But i tracked it down and found that the tal:condition statement
DM>  > caused the load in
DM>  > 
DM>  >             <a href="#"
DM>  >                  tal:condition="autor"
DM>  >                  tal:attributes="href autor/absolute_url"
DM>  >                  tal:content="string:${autor/Nachname}, ${autor/Vorname}">Ketchup, Heinz
DM>  >             </a>
DM>  > 
DM>  > I removed that and the time load shrinked from 7s to 1.5s.
DM> Unbelievable!

DM>   Are "autor" or "Nachname/Vorname" expensive in any way?

No , they're just attributes of an instance of 'Employee'.

I got a mail from Roger Espinosa who posted the following
(unfortunately not into the list):

RE> Mmm --- it's been my experience that sometimes tal:condition seems to
RE> grab the "call'ed" version of your object. I'd see if there was a 
RE> difference between saying

RE> tal:condition="autor"

RE> and

RE> tal:condition="python:autor" (or the equivalent of "autor is not None").

I tried

tal:condition="python:autor"

and

tal:condition="nocall:autor"

and for both everything is fine.

Thanks Roger.

-- 
Regards,
 Rainer                            mailto:thadi@gmx.de