-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: JavaScript
-
None
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)
)
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.
- related to
-
SERVER-3629 ensure that find readonly is implemented (SERVER-3107)
- Closed
-
SERVER-3631 modifying a non object member of a read only js object fails silently
- Closed