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

Optimize ProjectionNode output for inclusion projections

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.1.6
    • None
    • Aggregation Framework
    • None
    • Fully Compatible
    • 0

    Description

      As part of the work on SERVER-35493, we unified the majority of the logic for InclusionNode and ExclusionNode into a ProjectionNode base class. Because this class must agnostically support any projection type, inclusions now write to the output document using MutableDocument::setField rather than MutableDocument::addField, since exclusions cannot use addField. For large inclusion projections, however, this introduces a per-field performance hit, as setField's lookup-and-replace behaviour is slower than addField's straightforward append.

      Attachments

        Activity

          People

            bernard.gorman@mongodb.com Bernard Gorman
            bernard.gorman@mongodb.com Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: