Creating temporary sequence from DBObject is quite slow. Using .keySet for reduce collection and calling .get inside reduce is considerably faster. The common code between Map and DBObject implementations can't be shared as reflection would completely kill the performance and function can't be type hinted as DBObject doesn't implement Map interface. Added a simple test case for the from-db-object performance. I'm seeing performance increase of 20% on this (170ms -> 140ms). |
||
|---|---|---|
| .. | ||
| monger/test | ||
| resources | ||