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

Coverity analysis defect 135025: Inefficient vector resizing with reserve.

    • Storage Execution
    • Fully Compatible
    • ALL
    • v6.3, v6.2, v6.0, v5.0, v4.4, v4.2
    • Execution Team 2023-02-20

      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/catalog/index_consistency.cpp:285: INEFFICIENT_RESERVE 135025 A "std::vector" has its capacity adjusted with "reserve()" in a manner that is likely to have severe performance penalties.

            Assignee:
            dan.larkin-york@mongodb.com Dan Larkin-York
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: