[Zope-CMF] Excessive time load when processing relations

Rainer Thaden Rainer Thaden <Thadi@gmx.de>
Sun, 10 Nov 2002 23:17:41 +0100


Hi,

i developped a CMF Product for managing staff at a university
institute. There's one class 'Publication' and a class 'Employee' and
a publication is related to an 'Employee' by authorship (and coauthor).
To manage the relations between them i use mxmRelations.
The publications are displayed by a table which can be sorted by
author, date, etc.
So the task is to get the authors for all publications by
mxmRelations, get the names out of the 'Employee' instances and
display them.  
The problem is that it lasts up to 4 to 5 seconds until i get a
response where i (now) have only 6 publications to manage.
I use Zope 2.6 on W2k on a PIII 1,1 GHz.

What's consuming the load? Is it waking up the objects?

Here's a HTML snippet:

      <tr valign="top" class="grey" tal:repeat="veroeff batch"
          tal:attributes="class python:test(path('repeat/veroeff/even'), 'grey', 'white')">
        <td tal:define="autoren python:here.relations.get(veroeff, 'Autor');
                        coautoren python:here.relations.get(veroeff, 'CoAutor')">

          <span tal:repeat="autor autoren"
                tal:omit-tag="">
            <nobr>
            <a href="#"
                 tal:condition="autor"
                 tal:attributes="href autor/absolute_url"
                 tal:content="string:${autor/Nachname}, ${autor/Vorname}">Ketchup, Heinz
            </a>
            </nobr>
          </span>
          <br>

          <span tal:repeat="autor coautoren"
                tal:omit-tag="">
          <nobr>
            <a href="#"
                 tal:condition="autor"
                 tal:attributes="href autor/absolute_url"
                 tal:content="string:${autor/Nachname}, ${autor/Vorname}">Ketchup, Heinz
            </a>
          </nobr>
          </span>
        </td>
      </tr>
  

-- 
Regards,
 Rainer                          Thadi@gmx.de