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

For JS, add a findRO() that returns a read-only object, which can be much faster for certain cases

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9.1
    • Component/s: JavaScript
    • Labels:
      None

      Description

      if doing a find/read or find/insert in JS code, the JS object is considered writable.
      This makes it slower for read access, and also on insert() whole object is translated back an forth to JS.
      For example:
      db.col.find.foreach(function(d)

      {db.col2.insert(d)}

      )
      will convert entire object from bson to JS then JS to bson.
      Instead if an obj is explicitly marked as RO, we can reuse the exact same BSON.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              antoine Antoine Girbal
              Reporter:
              antoine Antoine Girbal
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: