Avoid creating unnecessary instances of CombinedUpdateDefinition<TDocument>

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      When using code like this:

      var updateDefinition = Builders<MyDocument>.Update
        Set(...)
        Set(...)
        Set(...)

      A tree of CombinedUpdateDefinition<MyDocument> will be created, Each one of them containing a List<UpdateDefinition<TDocument>> (which will hold a 4 element TDocument array).

      Combining with a CombinedUpdateDefinition<MyDocument> should be special cased to add to the existing CombinedUpdateDefinition<MyDocument> or, at least, create a single new one.

            Assignee:
            Unassigned
            Reporter:
            Paulo Morgado
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: