shama/nodewebkit

nodewebkit takes far too long to install

Opened this issue · 11 comments

This module hangs at 96% and takes around ~5 minutes while pegging cpu at 100% extracting and decompressing a file. If I use tar myself it takes 2 seconds:

$ time tar xzf node-webkit-v0.8.5-linux-x64.tar.gz 

real    0m2.040s
user    0m1.864s
sys 0m0.824s

I raised an issue upstream on the download module: kevva/download#11

Hmm I'll take a look. Extracting is quick for me on osx and ubuntu. download uses https://www.npmjs.org/tar and https://www.npmjs.org/zlib for extracting tar files: https://github.com/kevva/decompress/blob/master/index.js#L154

Could you try with those libraries directly and see if it is the extraction or our implementation that is the problem?

3y3 commented

I see same problem in Travis build

@3y3 Can you try the above as well and let us know if it is our implementation or zlib/tar?

3y3 commented

@shama , I don't have problems on local machine, but Travis CI cloud fails installation at sometime.
How about add travis config to project (I can add pr).
Also I checked one unhandled error event in logs, I'll find it and push pr.

Thanks for project, now we try to use it in node-inspector

Thanks @3y3. I've added the project to travis and will investigate (it is 3mins in and does indeed look slower than it should be). I'll see if I can isolate the issue.

A time it takes to download and separate one for extracting would be nice too.

I'm able to duplicate now on OSX with the linux x64 tar file. I created this repo to isolate the issue: https://github.com/shama/nodewebkit-test

It looks like tar sometimes gets hung up. This might be related to these issues: isaacs/node-tar#23 isaacs/node-tar#22

I'll see if I can find where it gets hung up on there.

Just throwing this out, https://github.com/mafintosh/tar-stream might be a good alternative to try. /cc @kevva

There's also https://github.com/shibukawa/node-ext-tar that uses native tar, might check that out too if it's stable enough. Should be faster.

The upstream issue was resolved on September 16th

Cool, thank @adam-lynch!

and @kevva as I think he is likely responsible for the fix. :D