[Zope-Checkins] SVN: Zope/branches/2.9/lib/python/Products/ZCatalog/ZCatalog.py if it's inefficient, don't do it unless it's used ; -)

Chris Withers chris at simplistix.co.uk
Tue Apr 4 06:25:23 EDT 2006


Log message for revision 66375:
  if it's inefficient, don't do it unless it's used ;-)

Changed:
  U   Zope/branches/2.9/lib/python/Products/ZCatalog/ZCatalog.py

-=-
Modified: Zope/branches/2.9/lib/python/Products/ZCatalog/ZCatalog.py
===================================================================
--- Zope/branches/2.9/lib/python/Products/ZCatalog/ZCatalog.py	2006-04-04 10:23:48 UTC (rev 66374)
+++ Zope/branches/2.9/lib/python/Products/ZCatalog/ZCatalog.py	2006-04-04 10:25:23 UTC (rev 66375)
@@ -481,11 +481,10 @@
             name = (name,)
 
         paths = self._catalog.uids.keys()
-        num_paths = len(paths)   # inefficient        
 
         i = 0
         if pghandler:
-            pghandler.init('reindexing %s' % name, num_paths)
+            pghandler.init('reindexing %s' % name, len(paths))
 
         for p in paths:
             i+=1



More information about the Zope-Checkins mailing list