Optimize ProjectionNode output for inclusion projections

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 4.1.6
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • None
    • Fully Compatible
    • 0
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Bernard Gorman
            Reporter:
            Bernard Gorman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: