Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-3358

Change O(n^2) function to be more performant

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Mango
    • Labels:
      None

      Description

      This is related to this https://issues.apache.org/jira/browse/COUCHDB-2951. When a user has a document with lots of field names, or nested fields with arrays, we add these fields to a special $fieldnames field. However, as we add them , we're calling lists:member on that same Acc, making it a O(n^2) operation.

        Attachments

          Activity

            People

            • Assignee:
              tonysun83 Tony Sun
              Reporter:
              tonysun83 Tony Sun
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: