summaryrefslogtreecommitdiff
path: root/db/btreecursor.cpp
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-07-16 09:45:59 -0700
committerAaron <aaron@10gen.com>2010-07-16 09:45:59 -0700
commit5e2fa26dd7c429b4747d462426c32a82e304f1d7 (patch)
treebc7c60e14110a60d23fef7c0ffe6c2a6bd537efb /db/btreecursor.cpp
parent326babfe6dc5180aef37ab9139e7dc32412c00f5 (diff)
downloadmongo-5e2fa26dd7c429b4747d462426c32a82e304f1d7.tar.gz
SERVER-802 some optimizations
Diffstat (limited to 'db/btreecursor.cpp')
-rw-r--r--db/btreecursor.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/db/btreecursor.cpp b/db/btreecursor.cpp
index 4290719494d..d6d0c09c4f6 100644
--- a/db/btreecursor.cpp
+++ b/db/btreecursor.cpp
@@ -63,8 +63,9 @@ namespace mongo {
audit();
startKey = bounds_->startKey();
bool found;
+ _boundsIterator->advance( startKey ); // handles initialization
bucket = indexDetails.head.btree()->
- locate(indexDetails, indexDetails.head, startKey, _ordering, keyOfs, found, direction > 0 ? minDiskLoc : maxDiskLoc, direction);
+ locate(indexDetails, indexDetails.head, startKey, _ordering, keyOfs, found, direction > 0 ? minDiskLoc : maxDiskLoc, direction);
skipAndCheck();
DEV assert( dups.size() == 0 );
}
@@ -165,16 +166,6 @@ namespace mongo {
}
void BtreeCursor::advanceTo( const BSONObj &keyBegin, int keyBeginLen, const vector< const BSONElement * > &keyEnd) {
-// log() << "curr: " << currKey() << ", advancing to: ";
-// BSONObjIterator boi( keyBegin );
-// int i;
-// for( i = 0; i < keyBeginLen; ++i ) {
-// log() << ", " << boi.next();
-// }
-// for( ;i < (int)keyEnd.size(); ++i ) {
-// log() << ", " << *keyEnd[ i ];
-// }
-// log() << endl;
bucket.btree()->advanceTo( indexDetails, bucket, keyOfs, keyBegin, keyBeginLen, keyEnd, _ordering, direction );
}