[Erp5-report] r24503 - /erp5/trunk/products/ERP5Form/ListBox.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Nov 5 23:23:43 CET 2008


Author: kazuhiko
Date: Wed Nov  5 23:23:42 2008
New Revision: 24503

URL: http://svn.erp5.org?rev=24503&view=rev
Log:
brain.absolute_url() is slow because it invokes _aq_dynamic() every time
to get brain.REQUEST, so we call request.physicalPathToURL() directly
instead of brain.absolute_url().

Modified:
    erp5/trunk/products/ERP5Form/ListBox.py

Modified: erp5/trunk/products/ERP5Form/ListBox.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Form/ListBox.py?rev=24503&r1=24502&r2=24503&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Form/ListBox.py [utf8] (original)
+++ erp5/trunk/products/ERP5Form/ListBox.py [utf8] Wed Nov  5 23:23:42 2008
@@ -2128,7 +2128,11 @@
         else:
           try:
             url = '%s/view?selection_index=%s&selection_name=%s&ignore_layout:int=%s&reset:int=1' % (
-                      brain.absolute_url(),
+                      # brain.absolute_url() is slow because it invokes
+                      # _aq_dynamic() every time to get brain.REQUEST,
+                      # so we call request.physicalPathToURL() directly
+                      # instead of brain.absolute_url().
+                      request.physicalPathToURL(brain.getPath()),
                       self.index, selection_name, ignore_layout)
           except AttributeError:
             pass




More information about the Erp5-report mailing list