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

Audit usages of BSONObj in query code

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Optimization

      There are a couple of typically problematic patterns that could indicate a potential performance bottleneck:

      • Repeated calls to BSONObj::getField (e.g. we want to retrieve multiple fields in a loop) rather than an up-front call to getFields or iterating over all fields in the BSONObj in one go rather than doing a linear search for each field)
      • Uses of BSON macros or BSONObjBuilder outside of testing/parsing code

      We should see if we can spot any of these & fix them- and consider introducing some kind of linting rule or automation to try to prevent new instances of these patterns emerging.

            Assignee:
            Unassigned Unassigned
            Reporter:
            alya.berciu@mongodb.com Alya Berciu
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: