[Commits] (donn) Improved the speed of Stamping
commits at osafoundation.org
commits at osafoundation.org
Sat Aug 14 17:00:55 PDT 2004
Commit by: donn
Modified files:
chandler/parcels/osaf/contentmodel/ContentModel.py 1.25 1.26
Log message:
Improved the speed of Stamping
------------------------------
* When searching for a target kind, only considering ContentItems
* This should fix bug 1744 (stamping performance)
ViewCVS links:
http://cvs.osafoundation.org/index.cgi/chandler/parcels/osaf/contentmodel/ContentModel.py.diff?r1=text&tr1=1.25&r2=text&tr2=1.26
Index: chandler/parcels/osaf/contentmodel/ContentModel.py
diff -u chandler/parcels/osaf/contentmodel/ContentModel.py:1.25 chandler/parcels/osaf/contentmodel/ContentModel.py:1.26
--- chandler/parcels/osaf/contentmodel/ContentModel.py:1.25 Wed Aug 11 19:22:22 2004
+++ chandler/parcels/osaf/contentmodel/ContentModel.py Sat Aug 14 17:00:54 2004
@@ -1,8 +1,8 @@
""" Classes used for contentmodel parcel and kinds.
"""
-__revision__ = "$Revision: 1.25 $"
-__date__ = "$Date: 2004/08/12 02:22:22 $"
+__revision__ = "$Revision: 1.26 $"
+__date__ = "$Date: 2004/08/15 00:00:54 $"
__copyright__ = "Copyright (c) 2003-2004 Open Source Applications Foundation"
__license__ = "http://osafoundation.org/Chandler_0.1_license_terms.htm"
@@ -202,11 +202,16 @@
def CandidateStampedKinds(self):
"""
return the list of candidate kinds for stamping
- right now, we consider all kinds
+ right now, we consider only ContentItems.
"""
kindKind = Globals.repository.findPath('//Schema/Core/Kind')
allKinds = Query.KindQuery().run([kindKind])
- return allKinds
+ contentItemKinds = []
+ contentItemKind = ContentModel.getContentItemKind ()
+ for aKind in allKinds:
+ if aKind.isKindOf (contentItemKind):
+ contentItemKinds.append (aKind)
+ return contentItemKinds
def ComputeTargetKindSignature(self, operation, stampKind):
"""
More information about the Commits
mailing list