SERVER-137014In Code Review
Fix performance problem in SBE $group by with large objects/arrays with similar values
In SBE, hashValue only hashes the first 4 values of an object or array. So if you have a lot of objects with boilerplate at the beginning (tenantId, customerId, etc) before the values differ, $group operations and set operations such as $addToSet become very slow. To fix this, make SBE hash all fields of an object or array.