SERVER-139171In Code Review
Reduce accumulator memory usage
Each accumulator embeds its own SimpleMemoryUsageTracker, which adds roughly 100 bytes of overhead per accumulator instance. That overhead adds up in a $group with many keys, because every group key holds one instance per accumulator. The same base class is used by accumulators that back window functions. Accumulators don't need most of what the tracker provides. They only compare their own usage against a local limit. They have no parent tracker, so they never sync with the operation-level tra