Commit c6469f68 authored by Tres Seaver's avatar Tres Seaver

Launchpad #348223: optimize catalog query by breaking out early from loop

over indexes if the result set is already empty.
parent 2d4af144
......@@ -35,7 +35,10 @@ Restructuring
Bugs Fixed
++++++++++
- Launchpad#344098: in ``skel/etc/zope.conf.ing``, replaced commented-out
- Launchpad #348223: optimize catalog query by breaking out early from loop
over indexes if the result set is already empty.
- Launchpad #344098: in ``skel/etc/zope.conf.ing``, replaced commented-out
``read-only-database`` option, which is deprecated, with pointers to the
appropos sections of ZODB's ``component.xml``. Updated the description
of the ``zserver-read-only-mode`` directive to indicate its correct
......@@ -187,7 +190,7 @@ Features added
Bugs Fixed
++++++++++
- Launchpad ##332168: Connection.py: do not expose DB connection strings
- Launchpad #332168: Connection.py: do not expose DB connection strings
through exceptions
- Specified height/width of icons in ZMI listings so the table doesn't
......
##############################################################################
#
# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
......@@ -477,7 +478,9 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
if r is not None:
r, u = r
w, rs = weightedIntersection(rs, r)
if not rs:
break
if rs is None:
# None of the indexes found anything to do with the request
# We take this to mean that the query was empty (an empty filter)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment