Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-657

LIKE and CONTAINS are much slower in 2.7

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.7.0
    • 2.7.1
    • LiteCore
    • Security Level: Public
    • Hide
      CBL: 2.7 (all platforms)
      SG: n/a
      Show
      CBL: 2.7 (all platforms) SG: n/a
    • CBL Sprint 13
    • 2

    Description

      The LIKE and CONTAINS query operators were rewritten in 2.7 (Mercury) to support Unicode collations. Unfortunately the new code is much slower, even in uncollated mode, leading to performance regressions in queries that use these operators.

      Initial report: https://github.com/couchbase/couchbase-lite-core/issues/902

      Another report, against iOS: https://github.com/couchbase/couchbase-lite-ios/issues/2603

      LiteCore PR with a fix: https://github.com/couchbase/couchbase-lite-core/pull/903

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            Jens Alfke, Jim Borden, how big a change is this? Is 2.7.1 worthy or too big and needs to go into Hydrogen?

            daniel.petersen Daniel Petersen added a comment - Jens Alfke , Jim Borden , how big a change is this? Is 2.7.1 worthy or too big and needs to go into Hydrogen?
            jens Jens Alfke added a comment -

            I think it's reasonable to merge into 2.7.1. Shouldn't be any conflicts.

            jens Jens Alfke added a comment - I think it's reasonable to merge into 2.7.1. Shouldn't be any conflicts.
            jens Jens Alfke added a comment -

            Fix was merged to LiteCore master on the 7th. Not yet cherry-picked to 2.7.1.

            jens Jens Alfke added a comment - Fix was merged to LiteCore master on the 7th. Not yet cherry-picked to 2.7.1.
            jens Jens Alfke added a comment -

            Since we don't have any performance tests, I just did some ad-hoc testing in an optimized build, running a fairly large query and using Xcode's Instruments to look at performance.

            jens Jens Alfke added a comment - Since we don't have any performance tests, I just did some ad-hoc testing in an optimized build, running a fairly large query and using Xcode's Instruments to look at performance.
            jimb Jim Borden added a comment -

            Mercury commit -> a23ccf8

            jimb Jim Borden added a comment - Mercury commit -> a23ccf8

            People

              jimb Jim Borden
              jens Jens Alfke
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty