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 ...@@ -35,7 +35,10 @@ Restructuring
Bugs Fixed 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 ``read-only-database`` option, which is deprecated, with pointers to the
appropos sections of ZODB's ``component.xml``. Updated the description appropos sections of ZODB's ``component.xml``. Updated the description
of the ``zserver-read-only-mode`` directive to indicate its correct of the ``zserver-read-only-mode`` directive to indicate its correct
...@@ -187,7 +190,7 @@ Features added ...@@ -187,7 +190,7 @@ Features added
Bugs Fixed Bugs Fixed
++++++++++ ++++++++++
- Launchpad ##332168: Connection.py: do not expose DB connection strings - Launchpad #332168: Connection.py: do not expose DB connection strings
through exceptions through exceptions
- Specified height/width of icons in ZMI listings so the table doesn't - Specified height/width of icons in ZMI listings so the table doesn't
......
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. # Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
...@@ -477,6 +478,8 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base): ...@@ -477,6 +478,8 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
if r is not None: if r is not None:
r, u = r r, u = r
w, rs = weightedIntersection(rs, r) w, rs = weightedIntersection(rs, r)
if not rs:
break
if rs is None: if rs is None:
# None of the indexes found anything to do with the request # None of the indexes found anything to do with the request
......
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