[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/common - UnIndex.py:1.25

Casey Duncan casey at zope.com
Fri Apr 23 11:47:35 EDT 2004


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/common
In directory cvs.zope.org:/tmp/cvs-serv5040/common

Modified Files:
	UnIndex.py 
Log Message:
Port performance fix for UnIndex.numObjects()


=== Zope/lib/python/Products/PluginIndexes/common/UnIndex.py 1.24 => 1.25 ===
--- Zope/lib/python/Products/PluginIndexes/common/UnIndex.py:1.24	Fri Apr 23 11:04:24 2004
+++ Zope/lib/python/Products/PluginIndexes/common/UnIndex.py	Fri Apr 23 11:47:33 2004
@@ -19,9 +19,6 @@
 from logging import getLogger
 from types import StringType, ListType, IntType, TupleType
 
-from Globals import Persistent
-from Acquisition import Implicit
-
 from BTrees.OOBTree import OOBTree, OOSet
 from BTrees.IOBTree import IOBTree
 from BTrees.IIBTree import IITreeSet, IISet, union, intersection
@@ -34,7 +31,7 @@
 _marker = []
 LOG = getLogger('Zope.UnIndex')
 
-class UnIndex(Persistent, Implicit, SimpleItem):
+class UnIndex(SimpleItem):
     """Simple forward and reverse index"""
 
     def __init__(
@@ -292,7 +289,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