[Checkins] SVN: Zope/branches/2.10/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py Merge r94047 from trunk: speed optimisation in path index searching order

Martijn Pieters mj at zopatista.com
Sun Dec 14 05:45:30 EST 2008


Log message for revision 94049:
  Merge r94047 from trunk: speed optimisation in path index searching order

Changed:
  U   Zope/branches/2.10/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py

-=-
Modified: Zope/branches/2.10/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
===================================================================
--- Zope/branches/2.10/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py	2008-12-14 10:44:26 UTC (rev 94048)
+++ Zope/branches/2.10/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py	2008-12-14 10:45:29 UTC (rev 94049)
@@ -184,7 +184,7 @@
             return IISet(self._unindex.keys())
 
         results = None
-        for i, comp in enumerate(comps):
+        for i, comp in reversed(list(enumerate(comps))):
             if not self._index.get(comp, {}).has_key(level+i): return IISet()
             results = intersection(results, self._index[comp][level+i])
         return results



More information about the Checkins mailing list