Code Monkey home page Code Monkey logo

Comments (4)

nodkz avatar nodkz commented on May 13, 2024

All 27 test cases (where 13 are using mongoose) take on my Mac only 11 seconds for graphql-compose-mongoose

screen shot 2018-06-12 at 17 18 53

What OS do you use?
Please provide output log for new MongoMemoryServer({ debug: true })
Thx.

from mongodb-memory-server.

AbdelrahmanHafez avatar AbdelrahmanHafez commented on May 13, 2024

This may actually be a mongoose issue for low performance on Windows, there has been an issue reporting low performance on mongoose.

gist including the output

Windows 10 Version 1803 (Build 17134.81)
mongoose v5.1.4
MongoDB v3.2.7

from mongodb-memory-server.

nodkz avatar nodkz commented on May 13, 2024

Spinning up a fresh database for every test file is slower than using with installed and running mongod process on dev machine.

BUT if you run tests in parallel (2-4 workers) with mongodb-memory-server you should get performance win in total execution time. With one process of mongod it quite complex task to prepare tests and code for parallel execution.

from mongodb-memory-server.

AbdelrahmanHafez avatar AbdelrahmanHafez commented on May 13, 2024

I don't think I am starting a fresh database for every test file, and I am not trying to achieve running tests in parallel right now (although that would be great to do), I actually initialize the database only once and run all tests in sequence.

Even after solving the mongoose performance issue, the result for mongodb-memory-server is still the same.

from mongodb-memory-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.