-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MongoMemoryServer.create unusually slow in v10 #889
Comments
because you are using MMS 10.x and the default binary of the workarounds are:
Note that there has been a note in the Migrate to version 10.0.0 guide. |
thanks @hasezoey ! |
If it helps here how we configured ramdisk for both mac and circleci: Mac
Run this script before running tests CircleCI
create MongoMemoryServerget tmpdir:
|
Hi there 👋 !
Versions
package: mongo-memory-server
What is the Problem?
I've been using this lovely package for a while for unit tests (thank you so much 🙏). I recently upgrade to the v10 (well, 10.0.1) and noticed my test were significantly longer. I realised that the startup of the in-memory mongo server took much more than usual.
There's always a "cold start" for the first run, but usually in v9 my mac would have the server ready in 80-90ms. Now it takes between 900ms and 1300ms before the promise resolves.
Code Example
FYI the
package.json
:Debug Output
Debug Output
Do you know why it happenes?
Nope - I haven't digged through the source though. My initial thought was that something previously cached in the startup procedure pre-v10, isn't anymore.
The text was updated successfully, but these errors were encountered: