import-js/eslint-plugin-import

npm install takes forever

adamlui opened this issue · 9 comments

I clocked it takes from 3min to an astounding over 10mins

Look how many processes I must run to catch up (and still lose) to my normally quick speed of adding pkgs to my 30+ repos

Image

ljharb commented

The speed of installing packages depends on your cpu, your internet connection, your OS, and the exact versions of node and npm you’re using. If things are too slow - even only with specific packages - it’s an issue you’ll need to file with npm, and there’s nothing we can do about it here.

That's not entirely true though, specific packages are often the cause and I even discovered it is because this one uses a lot of dependencies as indicated by nearly 2,000 lines added to package-lock.json in this commit for adding this plug-in adamlui/ai-web-extensions@64286d6 so it made npm spend lots of time downloading stuff

So there is something you could do (if you wanted and are able) which is reduce the number of dependencies, but only if you wanted to bring its install time in line with typical other ESLint plugins that take seconds (for me personally it is no longer an issue since I already treked thru the hours-long grind of setting it up across 30+ repos)

ljharb commented

That's not a goal I have, no, and it takes seconds for me to install it, so while there may be characteristics of specific packages that exacerbate the problem, I think it's a broader problem (for example, your screenshot is using the slowest possible OS that node supports).

But I use this same OS to install other ESLint plugins in seconds, surely it has to do with the thousands of lines added to package-lock.json the others don't add

ljharb commented

LIke I said, I'm sure that's correct. However, that doesn't create this problem for the majority of users - iow, it's your specific system/network/etc that's unable to handle having lots of dependencies versus an actual problem this package is causing (because having lots of deps is good and normal)

Well the lots of deps being good is debatable I wont get into here cuz this is separate issue but in my repos when an issue exists for even a minority of user envs I treat it as an actual bug due to it is my software not cooperating with all envs as intended when I wrote it, but I'm not asking you to re-open cuz it's your project just giving you my POV why this is a bug

ljharb commented

I understand how it's frustrating, but to rearchitect the entire project so a few users can save 30s of install time is not a reasonable cost-benefit thing to ask, I'm afraid.

Again I didn't ask you to do anything, as mentioned this is your project to emphasize any action you take or not is for your own benefit of boosting your software's UX for future users (of which there are more than a "few" on Windows) My suffering has already passed so your sacrifice is not for me. So do not think of any potential refactoring (which does not have to be an entire rearchitecting but chip away at the problem) as for my benefit but your own