jspm / npm

NPM Location Service
19 stars 31 forks source link

replace tar with tar-fs: ~40% faster unpack #141

Closed adamburgess closed 8 years ago

adamburgess commented 8 years ago

I'm not claiming 40% overall, but in my tests, it goes from 61 seconds to 35 seconds to unpack all the npm repos currently listed on JSPM's registry (I needed a sample...), and that's using tmpfs, so no overhead from the file system

It's basically a drop-in replacement apart from the filter function (achieves the same goal disallowing symlinks) and the events, where tar-fs doesn't always read to the end of the input so the finish event has to be put on the extract stream instead.

also on windows it seems to use significantly less memory, on linux it uses less, but not significantly