[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/common
- UnIndex.py:1.20.2.2
Casey Duncan
casey at zope.com
Fri Apr 23 10:29:26 EDT 2004
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/common
In directory cvs.zope.org:/tmp/cvs-serv22117/lib/python/Products/PluginIndexes/common
Modified Files:
Tag: Zope-2_7-branch
UnIndex.py
Log Message:
Merge performance fix for numObjects() which should cure the slowness of the Indexes tab for large ZCatalogs
=== Zope/lib/python/Products/PluginIndexes/common/UnIndex.py 1.20.2.1 => 1.20.2.2 ===
--- Zope/lib/python/Products/PluginIndexes/common/UnIndex.py:1.20.2.1 Wed Nov 26 12:44:18 2003
+++ Zope/lib/python/Products/PluginIndexes/common/UnIndex.py Fri Apr 23 10:29:25 2004
@@ -141,9 +141,7 @@
def __len__(self):
"""Return the number of objects indexed.
- This method is only called for indexes which have "old" BTrees,
- and the *only* reason that UnIndexes maintain a __len__ is for
- the searching code in the catalog during sorting.
+ This method is overridden per-instance with a cached Length object
"""
return len(self._unindex)
@@ -288,7 +286,7 @@
def numObjects(self):
""" return number of indexed objects """
- return len(self._unindex)
+ return len(self)
def unindex_object(self, documentId):
More information about the Zope-Checkins
mailing list