Sample project showing the performance issue from Mongoose 4.x to 5.x
When loading a large number of records for fairly complex schemas Mongoose 5.x takes significantly longer than Mongoose 4.x.
Steps to reproduce
- Clone this repo
- Install modules (
npm i
) - Build test data (
npm run build
) - Test with Mongoose v4.x (
npm run test-v4
) - Test with Mongoose v5.x (
npm run test-v5
)
On my development machine the v4.x test takes approx 4.7s to run and the v5.x test takes approx 16s to run.