-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.0
-
Component/s: Index Maintenance, Performance, Sharding
-
Environment:All
Replace 3 O(log n) operations with 1 for mutable FieldRange objects:
inline FieldRange &FieldRangeSet::range( const char *fieldName ) { - map<string,FieldRange>::iterator f = _ranges.find( fieldName ); - if ( f == _ranges.end() ) { - _ranges.insert( make_pair( string( fieldName ), universalRange() ) ); - return _ranges.find( fieldName )->second; - } - return f->second; + return _ranges.insert(make_pair(string(fieldName), universalRange())).first->second; }
Should help mongos and mongod – see 'nolog' call graphs in SERVER-7331.
- is related to
-
SERVER-7331 Optimize mongos performance
- Closed