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.
Is this a known Issue? Should I open a Ticket about this?