-
Type: Bug
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: 3.6.7, 3.6.8
-
Component/s: None
Issue originally reported as an upgrade problem from v3.6.6 to v3.6.8 here:
After upgrading the NodeJS driver package from 3.6.6 to 3.6.8 i encountered an unexpected performance issue when trying to insertMany() with 10K documents. I tracked down the issue and it seems that lib/operations/bulk_write.js line 80 in v3.6.8 the culprit. That is the reindexing operation performed on the insertedIds array.
In 3.6.6 the entire array was created from scratch which isnt possible in 3.6.8 due to restrictions not allowing the override of ‘r.insertedIds’. On my machine 3.6.6 is approximately 100x faster than 3.6.8 on the mentioned set with 10000 documents.
The cause of the problem was an incomplete backport of the bulk getters from 4.0: the now duplicate loops in operations/bulk_write.js were not removed when the getters were introduced.
- is related to
-
NODE-3310 Cache bulk getter method results for better performance in 4.0
- Backlog