[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/rotterdam/template Fixed a bug that caused work to be done unnecessarily, slowing down

Jim Fulton jim at zope.com
Thu Dec 8 18:08:40 EST 2005


Log message for revision 40646:
  Fixed a bug that caused work to be done unnecessarily, slowing down
  non-zmi requests about 20%.  This was a case where someone though that
  tal:define was executed after tal:condition.  The condition was trying
  and failing to guard some expensive computation.
  

Changed:
  U   Zope3/trunk/src/zope/app/rotterdam/template.pt
  U   Zope3/trunk/src/zope/app/rotterdam/template_tablelayout.pt

-=-
Modified: Zope3/trunk/src/zope/app/rotterdam/template.pt
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/template.pt	2005-12-08 20:36:03 UTC (rev 40645)
+++ Zope3/trunk/src/zope/app/rotterdam/template.pt	2005-12-08 23:08:40 UTC (rev 40646)
@@ -121,13 +121,14 @@
       <!-- OnlineHelp with popup support -->
       <!-- note, we reverse the actions list 'cos they're packed to the
            screen from the right -->
-      <div tal:condition="python: macroname == 'view'" id="actions"
-           tal:define="
+      <div tal:condition="python: macroname == 'view'" id="actions">
+        <span 
+            tal:condition="actions"
+            tal:define="
                help_actions context/@@view_get_menu/help_actions|nothing;
-               actions context/@@view_get_menu/zmi_actions">
-        <span tal:condition="actions"
-              tal:omit-tag=""
-					><a href="#"
+               actions context/@@view_get_menu/zmi_actions"
+            tal:omit-tag=""
+	    ><a href="#"
                tal:repeat="info actions"
                tal:attributes="href info/action"
                tal:content="info/title" i18n:translate="">

Modified: Zope3/trunk/src/zope/app/rotterdam/template_tablelayout.pt
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/template_tablelayout.pt	2005-12-08 20:36:03 UTC (rev 40645)
+++ Zope3/trunk/src/zope/app/rotterdam/template_tablelayout.pt	2005-12-08 23:08:40 UTC (rev 40646)
@@ -121,11 +121,11 @@
                     <!-- OnlineHelp with popup support -->
                     <!-- note, we reverse the actions list 'cos they're packed to the
                              screen from the right -->
-                    <div tal:condition="python: macroname == 'view'" id="action"
-                             tal:define="
-                                     help_actions context/@@view_get_menu/help_actions|nothing;
-                                     actions context/@@view_get_menu/zmi_actions">
-                        <ul>
+                    <div tal:condition="python: macroname == 'view'" id="action">
+                        <ul tal:define="
+                              help_actions context/@@view_get_menu/help_actions|nothing;
+                              actions context/@@view_get_menu/zmi_actions"
+                              >
                             <li tal:condition="actions" tal:repeat="info actions"
                                 ><a href="#"
                                          tal:attributes="href info/action"



More information about the Zope3-Checkins mailing list