Log message for revision 115071:
  Avoid the CatalogSearchArgumentsMap creation if we only get a dict as the 
first argument
  

Changed:
  U   Zope/trunk/src/Products/ZCatalog/Catalog.py

-=-
Modified: Zope/trunk/src/Products/ZCatalog/Catalog.py
===================================================================
--- Zope/trunk/src/Products/ZCatalog/Catalog.py 2010-07-25 10:33:12 UTC (rev 
115070)
+++ Zope/trunk/src/Products/ZCatalog/Catalog.py 2010-07-25 10:38:24 UTC (rev 
115071)
@@ -777,7 +777,11 @@
                           'the acquired request.',
                           DeprecationWarning, stacklevel=2)
             REQUEST = getattr(self, 'REQUEST', None)
-        args = CatalogSearchArgumentsMap(REQUEST, kw)
+        if isinstance(REQUEST, dict) and not kw:
+            # short cut for the best practice
+            args = REQUEST
+        else:
+            args = CatalogSearchArgumentsMap(REQUEST, kw)
         sort_index = self._getSortIndex(args)
         sort_limit = self._get_sort_attr('limit', args)
         reverse = 0

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to