mongodb/mongo — pull request #829 by esmet (2014-10-17 05:17:17+00:00)
Title: SERVER-15702 During collection scans, read the document from the RecordIterator

...instead of the Collection. This way the RecordIterator class can optimize document fetch for disklocs that were just returned.

Rationale: RecordIterators may be walking over a data structure that co-locates keys and values, so reading the value for a key just read is inexpensive compared to fetching that value indirectly through another interface (such as the Collection, which will do a new tree traversal).

Jira: https://jira.mongodb.org/browse/SERVER-15702
Discussion: https://groups.google.com/forum/#!topic/mongodb-dev/muyqfHE1lvg