Skip to content

Commit

Permalink
Explain the limit*4 case
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Apr 8, 2012
1 parent cd6040b commit 34e8c2c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Products/ZCatalog/Catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,9 @@ def sortResults(self, rs, sort_index, reverse=False, limit=None,
b_size, switched_reverse)
result = LazyCat(LazyValues(sequence), slen, actual_result_count)
elif limit is None or (limit * 4 > rlen):
# Iterate over the result set getting sort keys from the index
# Iterate over the result set getting sort keys from the index.
# If we are interested in at least 25% or more of the result set,
# the N-Best algorithm is slower, so we iterate over all.
if sort_index_length == 1:
for did in rs:
try:
Expand Down

0 comments on commit 34e8c2c

Please sign in to comment.