Coverity analysis defect 135025: Inefficient vector resizing with reserve.

XMLWordPrintableJSON

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

      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
              Reporter:
              Coverity Collector User
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: