Reduce memory usage of QueryResult

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.6.0
    • Component/s: Internal, Performance
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      QueryResult uses a list to store items, which results in excessive memory usage and unnecessary CPU load.

      Indeed, the MongoIterable API is streaming oriented with the functions forEach and iterator, it does not require the use of a list in the background.

      In addition, this prevents the use of reusable objects in a ThreadLocal to limit the creation of these and further improve the memory footprint.

              Assignee:
              Ross Lawley
              Reporter:
              Vincent GILLES
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: