[Erp5-report] r15282 - /erp5/trunk/products/ERP5Type/patches/DCWorkflow.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jul 24 09:28:08 CEST 2007


Author: seb
Date: Tue Jul 24 09:28:08 2007
New Revision: 15282

URL: http://svn.erp5.org?rev=15282&view=rev
Log:
it makes no sense to calculate portal_url outside the cached method and use it inside the cached method, by moving this calculation the performance might comes back to a better result

Modified:
    erp5/trunk/products/ERP5Type/patches/DCWorkflow.py

Modified: erp5/trunk/products/ERP5Type/patches/DCWorkflow.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/patches/DCWorkflow.py?rev=15282&r1=15281&r2=15282&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/patches/DCWorkflow.py (original)
+++ erp5/trunk/products/ERP5Type/patches/DCWorkflow.py Tue Jul 24 09:28:08 2007
@@ -115,8 +115,6 @@
       return None  # Optimization
     workflow_tool = getToolByName(self, 'portal_workflow')
     workflow = getattr(workflow_tool, self.id)
-    portal_url = getToolByName(self, 'portal_url')
-    portal_url = portal_url()
     _getPortalTypeListForWorkflow = CachingMethod(workflow.getPortalTypeListForWorkflow,
                                                   id=('_getPortalTypeListForWorkflow', self.id), 
                                                   cache_factory = 'erp5_ui_long')
@@ -125,6 +123,8 @@
       return None
 
     def _listGlobalActions(user=None, id=None, portal_path=None):
+      portal_url = getToolByName(self, 'portal_url')
+      portal_url = portal_url()
       sm = getSecurityManager()
       portal = self._getPortalRoot()
       res = []




More information about the Erp5-report mailing list