I like pnpm, which is like npm, but does caching by default, and does some other optimizations. (p is for parallel, I think)
The negative: sometimes it plays bad with some packages. Sometimes you need the (stupidly named) —shamefully-hoist, sometimes even that doesn’t help.
pnpm by default does NOT have the flat structure in node_modules but puts into separate sub-folders; sometimes it plays bad with some dependencies that expect the flat structure (usually webpack-related cludges)
But if you are starting fresh, or can spend some time on debugging, pnpm is amazing.
Re:Making pip installs a little less slow
by 8n4vidtmkvmk on Sunday May 29, 2022 @01:31AM
(#31546671)
pnpm is plug n play... modules i think.
Oh. Well that makes a bit less sense than “parallel”, honestly. Haha
pip-compile [0] is the best tool I've found for streamlining dependency resolution, but it may not provide any benefit for one-shot installs.
Re:Making pip installs a little less slow
by BiteCode_dev on Sunday May 29, 2022 @04:48AM
(#31547563)
For those who are wondering what is the benefit over pip freeze: pip freeze dumps you entire venv, while pip compile gets project dependancies, and infer the requirements file from that.
I'm not sure I get it -- if you had your core dependencies in setup.py / setup.cfg / pyproject.toml (for development) and then pip freeze (for creating a highly reproduced venv for applications), would that be similar?
Why would one want to infer the requirements file? Would that be like `pip list --not-required --format-freeze`?
On a related note: our NPM install times are even worse: any tips to help there would be welcome.