Snapshot is much larger than local files #338

Closed
kirbysayshi opened this Issue Oct 17, 2012 · 5 comments

Comments

Projects
None yet
3 participants

When I deploy my app, it takes around 1 minute to actually finish deploying. Since my app isn't huge, I began to investigate by grabbing one of the snapshots, and looking at file sizes. A single snapshot is around 30mb (!).

$ cd package
$ du -h

...
2.2M    ./node_modules/mongodb/.coverage_data/0
2.2M    ./node_modules/mongodb/.coverage_data/1
2.2M    ./node_modules/mongodb/.coverage_data/2
2.2M    ./node_modules/mongodb/.coverage_data/3
2.1M    ./node_modules/mongodb/.coverage_data/4
2.1M    ./node_modules/mongodb/.coverage_data/5
 13M    ./node_modules/mongodb/.coverage_data
...

When I attempted to find these files locally, I could not, so I assume there is a command that jitsu is running that is generating coverage reports for mongodb (or a command where a side effect is relatively large coverage reports).

Any idea what could be causing these to be generated? The deploy times aren't unreasonable, but this seems like something that could be easily remedied.

Contributor

bmeck commented Oct 17, 2012

Snapshots bundle dependencies to prevent versioning issues across deploys.
The mongo driver has an issue about including massive file bloat
On Oct 17, 2012 4:00 PM, "Andrew Petersen" notifications@github.com wrote:

When I deploy my app, it takes around 1 minute to actually finish
deploying. Since my app isn't huge, I began to investigate by grabbing one
of the snapshots, and looking at file sizes. A single snapshot is around
30mb (!).

$ cd package$ du -h

...
2.2M ./node_modules/mongodb/.coverage_data/0
2.2M ./node_modules/mongodb/.coverage_data/1
2.2M ./node_modules/mongodb/.coverage_data/2
2.2M ./node_modules/mongodb/.coverage_data/3
2.1M ./node_modules/mongodb/.coverage_data/4
2.1M ./node_modules/mongodb/.coverage_data/5
13M ./node_modules/mongodb/.coverage_data
...

When I attempted to find these files locally, I could not, so I assume
there is a command that jitsu is running that is generating coverage
reports for mongodb (or a command where a side effect is relatively large
coverage reports).

Any idea what could be causing these to be generated? The deploy times
aren't unreasonable, but this seems like something that could be easily
remedied.


Reply to this email directly or view it on GitHubhttps://github.com/nodejitsu/jitsu/issues/338.

When jitsu bundles the dependencies, does it call any test commands or coverage-like commands? I'd like to look into this if I have time, but a place to start would be helpful.

Contributor

bmeck commented Oct 18, 2012

It only runs npm install. It then puts all node_modules into
bundledDependencies
On Oct 17, 2012 11:45 PM, "Andrew Petersen" notifications@github.com
wrote:

When jitsu bundles the dependencies, does it call any test commands or
coverage-like commands? I'd like to look into this if I have time, but a
place to start would be helpful.


Reply to this email directly or view it on GitHubhttps://github.com/nodejitsu/jitsu/issues/338#issuecomment-9553180.

It has to be doing something differently, because those large files aren't
present when I npm install locally.

Is there a way to get jitsu to package a snapshot with debug output, but
without sending it as a real snapshot?

On Thursday, October 18, 2012, Bradley Meck wrote:

It only runs npm install. It then puts all node_modules into
bundledDependencies
On Oct 17, 2012 11:45 PM, "Andrew Petersen" <notifications@github.com<javascript:_e({}, 'cvml', 'notifications@github.com');>>

wrote:

When jitsu bundles the dependencies, does it call any test commands or
coverage-like commands? I'd like to look into this if I have time, but a
place to start would be helpful.


Reply to this email directly or view it on GitHub<
https://github.com/nodejitsu/jitsu/issues/338#issuecomment-9553180>.


Reply to this email directly or view it on GitHubhttps://github.com/nodejitsu/jitsu/issues/338#issuecomment-9562562.

Yip yip,
~ Drew*

Contributor

blakmatrix commented Feb 3, 2013

This does not seem to be an issue anymore see my attempt: https://gist.github.com/db31604aee13b0403d4a @kirbysayshi, please reopen this if you can reproduce, and if so pleas provide a gist of your package.json.

blakmatrix closed this Feb 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment