ExportXMLWordPrintableJSON

    • Query Execution
    • Fully Compatible
    • QE 2026-08-31
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Avoid recalculating the field name length in the name comparison loop inside BSONObjBuilder::hasField().

      The loop previously called `BSONElement::fieldName()`, which only returns a `const char*` pointing to the beginning of the field name. Converting this into an `std::string_view` for comparison required calling `strlen()` on the character pointer.
      This is avoidable work, because `BSONElement::fieldNameStringData()` can already return an `std::string_view` with the already-established fieldname length.

            Assignee:
            Jan Steemann
            Reporter:
            Jan Steemann
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: