Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-741

Performance Issue when parses BSONObj to C++ object

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • legacy-1.0.1
    • BSON
    • Open SUSE 13.1 64bit

    Description

      I try to implement c++ code that get about 800.000 document in a collection has 30 field (types include int, double, string), It take more than 240 seconds.

      To count duration time, I seperate code into 2 sections. The first invokes DBClientConnection::query to get all from collection and return vector of BSONObjs, it take 20 seconds. The last iterate that vector and parses each of BSONObj to a C++ object, using BSONObj::getField().Int() (or Double(), or String()). And, more than 200 seconds!

      Please consider and give me some advices to improve it.
      Thanks you.

      Attachments

        Activity

          People

            Unassigned Unassigned
            code4f Trinh The Thanh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: