-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 2.5.3
-
Component/s: Performance
-
Environment:N/A
Currently DBApiLayer iterates through documents TWICE in case '_id's have to be created ( "shouldApply" is true ): once to set "_id"s and the second time to create batch chunks.
This slows down the insert ( with any WriteConcern ).
Attaching a patch that optimizes the INSERT: now documents are iterated only ONCE without changing a current behavior.
/Anatoly
P.S. I am currently testing with application level partitioning, so different partitions actually sent to the different mongoDs in real time ( even distribution ): https://github.com/anatoly-polinsky/mongodb-write-performance-playground and the patch does help to boost the performance.