2 ms·
The archive must be extracted to run the program. So they maybe consume less space on disk, but then you pay a penalty every time you run the program since (I a
by alerighi 5y ago
The archive must be extracted to run the program. So they maybe consume less space on disk, but then you pay a penalty every time you run the program since (I assume) all these packages are extracted when you type yarn start (otherwise how can it work?)
The problem of wasted disk space... start using a modern filesystem like ZFS (or BTRFS, but it's less stable) that does Copy on Write and you shouldn't have these problems. Or deal with it, nowadays disk is very cheap and fast so I don't see why worrying that much.
I live with npm and that is fine, it's the most compatible solution.
- plorkyeran 5y agoDecompressing files from a single tar.gz into memory can very easily be faster than opening a very large number of small files.
- mmis1000 5y agoDepends on iops. On system with high iops(ssd), the impact of file count is negligible. On system with low iops (hhd, nfs or wsl on windows dirs), it is a nightmare. I used to try to run npm install in an old project on /mnt/c/ on wsl1. And the install that takes 20~30 second normally end up took 20 minutes. Because /mnt/c/ under wsl has extremely low iops.
- alerighi 5y agoThe problem is that then you have to write them on disk, since node expects to find a directory named node_modules somewhere. And yes you can expand them in /tmp that is typically mounted on a tmpfs (but not on Windows), but still you have to pass trough some kind of filesystem.