Coverity analysis defect 158643: Inefficient vector resizing with reserve.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • ALL
    • 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/pipeline/percentile_algo_accurate.cpp:78: INEFFICIENT_RESERVE 158643 A "std::vector" has its capacity adjusted with "reserve()" in a manner that is likely to have severe performance penalties.

            Assignee:
            Naama Bareket
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: