It would be reasonable to expect that extracting and parsing operations from an applyOps would be somewhat similar in cost to parsing the inner oplog entries if they weren't part of an applyops. Unfortunately this is not the case:
BM_NonApplyOpsParse/64/100 1044574 ns 1044562 ns 671 BM_NonApplyOpsParse/500/100 8120293 ns 8120136 ns 86 BM_ApplyOpsExtractOperationsTo/64/100 3752842 ns 3752796 ns 186 BM_ApplyOpsExtractOperationsTo/500/100 28395271 ns 28394950 ns 25
The parameters are the number of operations and their approximate size. ExtractOperationsTo is MUCH slower, and this may be the cause for some slowdowns in secondary application seen when batching inserts.
- related to
-
SERVER-88709 Get rid of "if obj.hasElement(field) then obj[field]" antipattern
- Open