antonmedv / jsize

Find out minified and gzipped npm package size
MIT License
178 stars 12 forks source link

Single temp dir #41

Closed DylanPiercey closed 7 years ago

DylanPiercey commented 7 years ago

Currently we create a new temp directory for every run. This was to resolve the issue where npm would loose control of the directory for some reason.

This change however makes it so that repeat runs are quite a bit slower since it has to rebuild the node_modules folder every time. Also it now uses much more disk space than previously.

I think ideally we would find a way to resolve the original issue without having to create a new folder for each run.

DylanPiercey commented 7 years ago

Thinking on this further - It would be cool if each build was installed in it's own folder.

IE:

jsize react+react-dom angular

Would create temp/jsize-react@latest+react-dom@latest and temp/angular@latest.

Since each build would have it's own folder we could then run them in parallel without having indeterminate builds.

Just something to think about.

antonmedv commented 7 years ago

I was thinking of creating separate solder for each build like this: $tmp/jsize-$sha1(packages) but due to current implementations it was difficult.

Also tmp dir will be cleared each three days if no access to files was made.

DylanPiercey commented 7 years ago

I think we'll leave this for now.