9

I've been cleaning up my directories and noticed that each Meteor.js project takes up at least 77MB (and typically, more like 150MB)! To figure out what was happening, I went ahead and created a new app:

meteor create myapp

At this point, the folder takes up about 7kb. But after I do this

cd myapp
meteor

the folder size balloons up to 77MB.

After some digging around, I managed to pinpoint to size increase the .meteor/db folder. More specifically, running the app creates these local* files inside .meteor/db which are each >16Mbs. I opened these and they're mainly just a long string of 0000s with a few non-0000s here and there. If I start doing more -- adding data, to Meteor.collections, etc -- the size balloons to 100+MB.

My questions

  • What are these files for and why are they so huge?
  • Is there any way to make my app smaller (zipping the folder cuts the size down to 1.8MB so a lot of the additional bloat looks like it could be stripped away somehow.
adilapapaya
  • 4,765
  • 3
  • 25
  • 26

3 Answers3

16

Running meteor in development mode (the default) creates an instance of mongodb for you under your .meteor directory. It's huge, I know. But don't worry - this is only for development so you don't need to setup your own mongodb instance on your localhost. You can clean it up at any time by running:

$ meteor reset

When you go to deploy your app, you will bundle your project which does not include any of these files.

David Weldon
  • 63,632
  • 11
  • 148
  • 146
  • Ah, I see. Thanks! Is this minimongo? Also, can I just delete those local* files directly or will that mess things up? – adilapapaya Mar 04 '14 at 17:59
  • 2
    No, it's a real instance of mongodb. Minimongo is a simplified version of mongo which runs on the client (it's what allows you to run mongo commands in your templates). I'm unclear if removing the files manually is safe, and the file layout will probably change over time, so I can't advise that. – David Weldon Mar 04 '14 at 18:06
  • 2
    Most of the files will be recreated once you run the meteor command again, however, you may be able to break things by removing certain combinations of files. – 1321941 Mar 04 '14 at 18:09
3

To add to what David Weldon said.

If the size of the app locally is an issue, you could always use a Mongo database that is not stored locally, like a mongodb-as-a-service provider such as: MongoLab or MongoHQ

Community
  • 1
  • 1
1321941
  • 2,139
  • 5
  • 26
  • 49
0

Also, for me using jasmine tests created a mirrors folder totaling 15Gb...

Guig
  • 9,891
  • 7
  • 64
  • 126