[CMF-checkins] CVS: Products/CMFCore - CMFCatalogAware.py:1.21.2.6

Julien Anguenot ja at nuxeo.com
Fri Apr 22 12:23:27 EDT 2005


Update of /cvs-repository/Products/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv3705

Modified Files:
      Tag: CMF-1_5-branch
	CMFCatalogAware.py 
Log Message:
Optimization in case of an indexable container


=== Products/CMFCore/CMFCatalogAware.py 1.21.2.5 => 1.21.2.6 ===
--- Products/CMFCore/CMFCatalogAware.py:1.21.2.5	Fri Apr 22 12:20:17 2005
+++ Products/CMFCore/CMFCatalogAware.py	Fri Apr 22 12:23:21 2005
@@ -85,7 +85,12 @@
         if catalog is not None:
             path = '/'.join(self.getPhysicalPath())
             for brain in catalog.unrestrictedSearchResults(path=path):
-                ob = self.unrestrictedTraverse(brain.getPath(), None)
+                brain_path = brain.getPath()
+                # self is treated at the end of the method
+                # Optimization in case of an indexable container
+                if brain_path == path:
+                    continue
+                ob = self.unrestrictedTraverse(brain_path, None)
                 if ob is None:
                     # Ignore old references to deleted objects.
                     continue



More information about the CMF-checkins mailing list