Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-92167

Coverity analysis defect 156773: Inefficient vector resizing with reserve.

    • Query Execution
    • v8.0
    • QO 2024-07-22

      Inefficient vector resizing with reserve.

      This operation, if performed to grow large vectors, may take a very long time to complete. A vector's capacity is increased with reserve in a manner that causes many unnecessary copies.
      /src/mongo/db/pipeline/document_source_lookup.cpp:269: INEFFICIENT_RESERVE 156773 A "std::vector" has its capacity adjusted with "reserve()" in a manner that is likely to have severe performance penalties.

            Assignee:
            henri.nikku@mongodb.com Henri Nikku
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: