[Checkins] [zopefoundation/Products.ZCatalog] 7bd631: [BACKPORT] Avoid potentially expensive `len()` cal...

GitHub noreply at github.com
Thu Oct 9 17:49:50 CEST 2014


  Branch: refs/heads/2.13
  Home:   https://github.com/zopefoundation/Products.ZCatalog
  Commit: 7bd631e8c9addb88fc883e1f151c1df363ec0d45
      https://github.com/zopefoundation/Products.ZCatalog/commit/7bd631e8c9addb88fc883e1f151c1df363ec0d45
  Author: Mauro Amico <mauro.amico at gmail.com>
  Date:   2014-10-09 (Thu, 09 Oct 2014)

  Changed paths:
    M src/Products/ZCatalog/plan.py

  Log Message:
  -----------
  [BACKPORT] Avoid potentially expensive `len()` call in value index estimation.

backport:

https://github.com/zopefoundation/Products.ZCatalog/commit/3770bc998a2656ecdcfc494d5996e6a89fbc2365

Avoid potentially expensive `len()` call in value index estimation.

Instead iterate over unique values and break if we can get more than
`MAX_DISTINCT_VALUES` values. Also correctly identify empty indexes like the
DateRangeIndex, which only returns values when the name argument is provided
to the uniqueValues method with either the `since` or `until` field.


  Commit: e8a1e19a273ce2b527af5eb5860cd458d24856cb
      https://github.com/zopefoundation/Products.ZCatalog/commit/e8a1e19a273ce2b527af5eb5860cd458d24856cb
  Author: Tres Seaver <tseaver at palladion.com>
  Date:   2014-10-09 (Thu, 09 Oct 2014)

  Changed paths:
    M src/Products/ZCatalog/plan.py

  Log Message:
  -----------
  Merge pull request #4 from mamico/patch-1

[BACKPORT] Avoid potentially expensive `len()` call in value index estimation


Compare: https://github.com/zopefoundation/Products.ZCatalog/compare/91bba1af4d4d...e8a1e19a273c


More information about the checkins mailing list