|
In SERVER-39950 we merged some redundant code paths between sync tail and initial sync. In doing so we lost some optimizations which affect the insert_vector test performance on secondaries.
The largest effect is probably the extra copy of the batch here
https://github.com/10gen/mongo/blob/857e5ff84b57167abcfb875c56a3cda1464de563/src/mongo/db/repl/oplog_batcher.cpp#L296
But also note this pre-allocation may not be useful after removing that
https://github.com/10gen/mongo/blob/8c11a9d7c59a156619ba387be14eb584f979442a/src/mongo/db/repl/oplog_batcher.h#L50
whereas pre-allocation here may be helpful
https://github.com/10gen/mongo/blob/857e5ff84b57167abcfb875c56a3cda1464de563/src/mongo/db/repl/oplog_batcher.cpp#L160
|